https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123551
--- 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:e4c2d1952a6f0d00430f8cbed796524650211cc3 commit r16-6777-ge4c2d1952a6f0d00430f8cbed796524650211cc3 Author: Jakub Jelinek <[email protected]> Date: Wed Jan 14 17:09:13 2026 +0100 c++: Don't ICE on computed goto in potential_constant_expression_1 [PR123551] r16-968-g5c6364b09a6 has added if (DECL_ARTIFICIAL (*target)) return true; stmt for GOTO_EXPRs. This unfortunately ICEs if *target is not a decl, which is the case for computed gotos. For those we should always reject them, so the following patch additionally checks for LABEL_DECL before testing DECL_ARTIFICIAL on it. 2026-01-14 Jakub Jelinek <[email protected]> PR c++/123551 * constexpr.cc (potential_constant_expression_1) <case GOTO_EXPR>: Only test DECL_ARTIFICIAL on LABEL_DECLs. * g++.dg/ext/goto2.C: New test.
