[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
Tue Feb 13 20:42:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82210
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Feb 13 20:23:58 2018
New Revision: 257635
URL: https://gcc.gnu.org/viewcvs?rev=257635&root=gcc&view=rev
Log:
PR c/82210
* stor-layout.c (place_field): For variable length fields, adjust
offset_align afterwards not just based on the field's alignment,
but also on the size.
* gcc.c-torture/execute/pr82210.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr82210.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/stor-layout.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list