This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/66661] incorrect memory access in optimization with flexible array member
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Jun 2015 07:54:47 +0000
- Subject: [Bug middle-end/66661] incorrect memory access in optimization with flexible array member
- Auto-submitted: auto-generated
- References: <bug-66661-4 at http dot gcc dot gnu dot org/bugzilla/>
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).