[Bug c++/124573] [15/16 Regression] internal compiler error in finish_enum_value_list with templated scoped enum redeclaration
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Apr 4 12:59:47 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124573
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:
https://gcc.gnu.org/g:e1844765af501eb044598e4dc6ad8e729948f7bc
commit r16-8465-ge1844765af501eb044598e4dc6ad8e729948f7bc
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Sat Apr 4 13:57:55 2026 +0100
PR c++/124573: ICE on invalid P4 regression
This patch addresses PR c++/124573 by making finish_enum_value_list more
robust to DECL_INITIAL being NULL, which I believe only occurs in the
event of an error, and treating it as integer_zero_node for the purposes
of error recovery.
2026-04-04 Roger Sayle <roger@nextmovesoftware.com>
gcc/cp/ChangeLog
PR c++/124573
* decl.cc (finish_enum_value_list): Defend against a DECL_INITIAL
being NULL during error recovery.
gcc/testsuite/ChangeLog
PR c++/124573
* g++.dg/other/enum4.C: New test case.
More information about the Gcc-bugs
mailing list