[Bug middle-end/66661] incorrect memory access in optimization with flexible array member
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 25 07:54:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66661
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yes, consider
struct X { int n; char x[1]; };
which has sizeof(X) == 8 unless you use __attribute__((packed)) (in which case
alignment also gets dropped down to 1).
More information about the Gcc-bugs
mailing list