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 <[email protected]>: https://gcc.gnu.org/g:e1844765af501eb044598e4dc6ad8e729948f7bc commit r16-8465-ge1844765af501eb044598e4dc6ad8e729948f7bc Author: Roger Sayle <[email protected]> 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 <[email protected]> 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.
