This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/82210] [6 Regression] Having _Alignas in a struct with VLAs causes writing to one array to overwrite another
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Jun 2018 17:22:19 +0000
- Subject: [Bug c/82210] [6 Regression] Having _Alignas in a struct with VLAs causes writing to one array to overwrite another
- Auto-submitted: auto-generated
- References: <bug-82210-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82210
--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Jun 25 17:21:47 2018
New Revision: 262063
URL: https://gcc.gnu.org/viewcvs?rev=262063&root=gcc&view=rev
Log:
Backported from mainline
2018-02-13 Jakub Jelinek <jakub@redhat.com>
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:
branches/gcc-6-branch/gcc/testsuite/gcc.c-torture/execute/pr82210.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/stor-layout.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog