On Thu, 15 Mar 2012, Eric Botcazou wrote: > > Ok, I applied a fix for PR52134 and am preparing a fix for PR52578. > > It seems we might not be able to rely on > > > > tree maxsize = size_diffop (TYPE_SIZE_UNIT (DECL_CONTEXT (field)), > > DECL_FIELD_OFFSET (repr)); > > gcc_assert (host_integerp (maxsize, 1)); > > > > but at least until we get a testcase that shows so I won't add > > (unexercised) code that handles it. Eventually we'd need to treat > > tail-padding specially for some languages anyway, via a new langhook. > > This caused 3 classes of problems in Ada: > > 1. failure of the above assertion (pack7.ads) > 2. ICE in tree_low_cst (pack16.adb, pack16_pkg.ads) > 3. miscompilation (to be dealt with later). > > 1. and 2. appear to come from variable-sized fields (and 3. from record types > with variant part). Testcases attached, they can be installed as: > > gnat.dg/pack16.adb > gnat.dg/pack16_pkg.ads > gnat.dg/specs/pack7.ads > > in the testsuite.
I'll address these and add the testcases. Thanks, Richard.