in libbid we have typedef __attribute__((aligned(16))) struct { unsigned long long w[3]; } UINT192;
UINT192 bid_Kx192[32]; thus we request 16-byte alignment for UINT192 (whose elements add up to a size of 24). Now the array ends up with elements of size 24 and thus the elements are _not_ aligned to a 16-byte boundary, still the element type is not adjusted to reflect that leading to inconsistencies when one for example tries to set operand 3 of an ARRAY_REF (which is specified in units of the alignment of the element). This causes PR43783. This is also at least a documentation bug as I can't find anything that documents the above behavior. -- Summary: attribute((aligned(x))) not honored for array element types? Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: wrong-code, documentation Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43798