------- Comment #18 from matz at gcc dot gnu dot org 2009-05-06 11:57 ------- The structure in this testcase is not packed. One member is. Or are you talking about some different case?
Let's suppose you are and you mean something like this: struct S {T1 m1; T2 m2; ...} __attribute__((packed)); then IMO all members should also have DECL_PACKED set. I don't think this is currently the case (only TYPE_PACKED is set on the whole struct type), but conceptually that is the ultimate meaning. If we don't do that we still can create such unaligned types when building COMPONENT_REFs, when the base datum has TYPE_PACKED set, i.e. option (2). But let's deal with one case after the other, I'm currently concerned with only packed members. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39954