This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77830] internal compiler error: in output_constructor_regular_field, at varasm.c:4968, when using constexpr (with testcase)
- 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: Wed, 21 Dec 2016 21:58:55 +0000
- Subject: [Bug c++/77830] internal compiler error: in output_constructor_regular_field, at varasm.c:4968, when using constexpr (with testcase)
- Auto-submitted: auto-generated
- References: <bug-77830-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77830
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Dec 21 21:58:23 2016
New Revision: 243873
URL: https://gcc.gnu.org/viewcvs?rev=243873&root=gcc&view=rev
Log:
PR c++/77830
* constexpr.c (cxx_eval_array_reference): Perform out of bounds
verification even if lval is true, just allow one past the last
element in that case.
(cxx_eval_store_expression): Detect stores to out of bound
ARRAY_REF.
* g++.dg/cpp1y/pr77830.C: New test.
* g++.dg/cpp0x/pr65398.C: Adjust expected diagnostics.
Added:
trunk/gcc/testsuite/g++.dg/cpp1y/pr77830.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/constexpr.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/pr65398.C