* ensure that necessary padding bytes in a non-anonymous aggregate are added

before any nested aggregate

git-svn-id: trunk@32521 -
This commit is contained in:
Jonas Maebe 2015-11-24 20:10:38 +00:00
parent ef3bafd67c
commit 1d460eebc1

View File

@ -375,12 +375,14 @@ implementation
{ either add to the current typed const aggregate (if nested), or
emit to the asmlist (if top level) }
curagg:=tllvmaggregateinformation(curagginfo);
{ create aggregate information for this new aggregate }
inherited;
{ only add the new aggregate to the previous aggregate now, because
the inherited call may have had to add padding bytes first }
if assigned(curagg) then
curagg.aggai.addvalue(agg)
else
fasmlist.concat(agg);
{ create aggregate information for this new aggregate }
inherited;
{ set new current typed const aggregate }
tllvmaggregateinformation(curagginfo).aggai:=agg
end