[Bug c++/69517] [7 regression] SEGV on a VLA with excess initializer elements
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 4 00:44:00 GMT 2017
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.
More information about the Gcc-bugs
mailing list