From 209bfaa77444a7fd0f225f52ceef84e18769183c Mon Sep 17 00:00:00 2001 From: sergei Date: Fri, 8 Feb 2013 17:53:04 +0000 Subject: [PATCH] + MIPS: Allocate a LOC_VOID location for empty records, avoids internal errors in other parts of compiler. git-svn-id: trunk@23586 - --- compiler/mips/cpupara.pas | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/compiler/mips/cpupara.pas b/compiler/mips/cpupara.pas index 1cee0f1873..ce3e549fa7 100644 --- a/compiler/mips/cpupara.pas +++ b/compiler/mips/cpupara.pas @@ -360,6 +360,16 @@ implementation hp.paraloc[side].intsize:=paralen; hp.paraloc[side].size:=paracgsize; hp.paraloc[side].def:=paradef; + + if (paralen=0) then + if (paradef.typ=recorddef) then + begin + paraloc:=hp.paraloc[side].add_location; + paraloc^.loc:=LOC_VOID; + end + else + internalerror(2013020601); + { check the alignment, mips O32ABI require a nature alignment } tmp := align(intparasize, alignment) - intparasize; while tmp > 0 do