------- Additional Comments From amylaar at gcc dot gnu dot org  2005-04-15 
15:32 -------
Created an attachment (id=8650)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8650&action=view)
Additional testcase

This is another testlet snipped out of gcc-dg-struct-layout-1-t026-01.
With the original patch, in struct S2503 field d overlaps field b,
and hence the store goes into the wrong place.
The idea of putting packed bit fields into rli->prev_field is bogus to
start with.  These fields are not necesasrily aligned like the underlying type,

and packed fields are not supposed to place more restrictions on the placement
of surrounding fields than ordinary non-bitfield types.  E.g. a packed
long long bitfield of size 8 is not expected to reserve more space than a
char field, even if it is followed by a non-packed bitfield of a different
type.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20371

Reply via email to