re PR c/82210 (Having _Alignas in a struct with VLAs causes writing to one array...
authorJakub Jelinek <jakub@redhat.com>
Tue, 13 Feb 2018 20:23:58 +0000 (21:23 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 13 Feb 2018 20:23:58 +0000 (21:23 +0100)
commit201d17c0d835112bdea5408e6eff4e250f3c238a
tree92d22bae34f8e96ab555625eb004d08a97d5a9d6
parent9aa484f5a9c74509ecf9722a518b962f0634dad2
re PR c/82210 (Having _Alignas in a struct with VLAs causes writing to one array to overwrite another)

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.

From-SVN: r257635
gcc/ChangeLog
gcc/stor-layout.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr82210.c [new file with mode: 0644]