This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69517] [7 regression] SEGV on a VLA with excess initializer elements
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Jan 2017 00:44:39 +0000
- Subject: [Bug c++/69517] [7 regression] SEGV on a VLA with excess initializer elements
- Auto-submitted: auto-generated
- References: <bug-69517-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69517
--- Comment #15 from Martin Sebor <msebor at gcc dot gnu.org> ---
The test case from comment #0 doesn't crash for me either but one that
initializes the VLA with more than 6 elements, say like so, does:
int a[n] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
With both test cases the tree dump shows that GCC writes past the end of the
array.