> But it's only ever computed for RECORD_TYPEs where DECL_QUALIFIER is
OK, that could work indeed.
> For now giving up seems to be easiest (just give up when
> DECL_FIELD_OFFSET is not equal for all of the bitfield members).
> That will at most get you the miscompiles for the PRs back, for
> languages with funny structure layout.
I have another variant of the DECL_FIELD_OFFSET problem:
FAIL: gnat.dg/specs/pack8.ads (test for excess errors)
+===========================GNAT BUG DETECTED==============================+
| 4.8.0 20120314 (experimental) [trunk revision 185395] (i586-suse-linux) GCC
| in finish_bitfield_representative, at stor-layout.c:1762 |
| Error detected at pack8.ads:17:4
I agree that giving up (for now) is a sensible option. Thanks.
package Pack8 is
subtype Index_Type is Integer range 1 .. Pack8_Pkg.N;
subtype Str is String( Index_Type);
subtype Str2 is String (1 .. 11);
type Rec is record
S1 : Str;
S2 : Str;
B : Boolean;
S3 : Str2;
pragma Pack (Rec);
package Pack8_Pkg is
N : Natural := 1;