From a7c893064a0434645a59e1ea627799dac93db6ba Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 28 Aug 2016 22:07:57 +0000 Subject: [PATCH] * only don't insert passing alignment immediately for anonymous records rather than for any anonymous aggregate, since for arrays we do know the alignment even if we don't know the element count (because it only depends on the elementdef, which is/will be set immediately) git-svn-id: trunk@34390 - --- compiler/aasmcnst.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/aasmcnst.pas b/compiler/aasmcnst.pas index 731922ca21..4ae539bd3f 100644 --- a/compiler/aasmcnst.pas +++ b/compiler/aasmcnst.pas @@ -1367,7 +1367,9 @@ implementation { if we're starting an anonymous record, we can't align it yet because the alignment depends on the fields that will be added -> we'll do it at the end } - else if not anonymous then + else if not anonymous or + ((def.typ<>recorddef) and + not is_object(def)) then begin { add padding if necessary, and update the current field/offset } info:=curagginfo;