[Bug c++/69516] [5/6 regression] infinite recursion on a VLA with excess initializer elements in constexpr function
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jan 29 09:25:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69516
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Fri Jan 29 09:25:14 2016
New Revision: 232969
URL: https://gcc.gnu.org/viewcvs?rev=232969&root=gcc&view=rev
Log:
PR c++/69509
PR c++/69516
* constexpr.c (cxx_eval_array_reference): Give the "array subscript
out of bound" error earlier.
* init.c (build_vec_init): Change NE_EXPR into GT_EXPR. Update the
commentary.
* g++.dg/ext/constexpr-vla2.C: New test.
* g++.dg/ext/constexpr-vla3.C: New test.
* g++.dg/ubsan/vla-1.C: Remove dg-shouldfail.
Added:
trunk/gcc/testsuite/g++.dg/ext/constexpr-vla2.C
trunk/gcc/testsuite/g++.dg/ext/constexpr-vla3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
trunk/gcc/cp/init.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ubsan/vla-1.C
More information about the Gcc-bugs
mailing list