This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/69517] [7 regression] SEGV on a VLA with excess initializer elements


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]