On Tue, 7 Feb 2012, Richard Guenther wrote: > The following patch rewrites the bitfield handling of the C++ memory > model and enables it unconditionally to fix PR52080. As I suggested > earlier at some point this moves computation of what the memory model > considers the underlying object we may access to the point where we > lay out a structure type. This allows other passes like for example > SRA or a new bitfield lowering pass to use a canonical (and correct) > addressable object to access bitfields. The underlying object is > represented as a FIELD_DECL that would be a suitable replacement > for all bitfield FIELD_DECLs if you wrap it inside a BIT_FIELD_REF > (see the gimplify.c hunk). But the main purpose (for now) is to > make use of it in get_bit_range which no longer needs to walk > all fields of a record nor build new trees or use get_inner_reference.
Please excuse an ignorant question: is there somewhere in that new code where you should consider target bitfield layout macros like EMPTY_FIELD_BOUNDARY and PCC_BITFIELD_TYPE_MATTERS? (Just guessing: alignment.) Or maybe that's a later stage? brgds, H-P