[Bug c++/123331] [15/16 regression] ICE: in cxx_eval_store_expression, at cp/constexpr.cc since r15-7260
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 3 11:19:45 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123331
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:66fbe318e2df40ff548bc22a7abe5fa8de88429c
commit r16-6475-g66fbe318e2df40ff548bc22a7abe5fa8de88429c
Author: Jakub Jelinek <jakub@redhat.com>
Date: Sat Jan 3 12:15:30 2026 +0100
c++: Fix error recovery for invalid arrays [PR123331]
The following testcase ICEs since the conditional
eltinit = build2 (INIT_EXPR, ...) has been added to cxx_eval_vec_init_1.
If there are errors, eltinit will be error_mark_node and we can ICE during
constant evaluation of that.
Fixed by skipping it for error operands.
2026-01-03 Jakub Jelinek <jakub@redhat.com>
PR c++/123331
* constexpr.cc (cxx_eval_vec_init_1): Don't build INIT_EXPR if
eltinit is erroneous.
* g++.dg/other/pr123331.C: New test.
More information about the Gcc-bugs
mailing list