[Bug c/82210] [6/7/8 Regression] Having _Alignas in a struct with VLAs causes writing to one array to overwrite another

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 7 12:26:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82210

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This changed with r146817, so I'd look at a problem in expansion rather than
much earlier.  DECL_SIZE_UNIT should match what sizeof is, so you can't just
change it at will, it is part of the ABI.  Arrays of overaligned structures are
just weird, but I believe they don't grow the size of the elements, so only the
first array element is aligned and the remaining ones are not.


More information about the Gcc-bugs mailing list