https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122836
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <[email protected]>: https://gcc.gnu.org/g:1804554a11d4dcdc0d513926f90fb1f33b0eeba9 commit r16-5834-g1804554a11d4dcdc0d513926f90fb1f33b0eeba9 Author: Jakub Jelinek <[email protected]> Date: Tue Dec 2 14:36:06 2025 +0100 c++: Fix up error recovery for invalid designators [PR122836] The following testcase ICEs since r12-7741 on the newly added gcc_assert. We've diagnosed the designator is invalid before, but kept it as is. The following patch changes it into error_mark_node, so that don't ICE on it. 2025-12-02 Jakub Jelinek <[email protected]> PR c++/122836 * decl.cc (check_array_designated_initializer): Change ce->index to error_mark_node after emitting an error for it. * g++.dg/ext/pr122836.C: New test.
