https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117925
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Patrick Palka <ppa...@gcc.gnu.org>: https://gcc.gnu.org/g:aa1e19d821a39d973c4c8c0e8d1d19811d2fa433 commit r14-11176-gaa1e19d821a39d973c4c8c0e8d1d19811d2fa433 Author: Patrick Palka <ppa...@redhat.com> Date: Thu Jan 9 10:50:08 2025 -0500 c++: relax ICE for unexpected trees during constexpr [PR117925] When we encounter an unexpected (likely templated) tree code during constexpr evaluation we currently ICE even in release mode. But it seems more user-friendly to just gracefully treat the expression as non-constant, which will be harmless most of the time (e.g. in the case of warning-specific or speculative constexpr folding as in the PR), and at worst will transform an ICE-on-valid bug into a rejects-valid bug. This is also what e.g. tsubst_expr does when it encounters an unexpected tree code. PR c++/117925 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_constant_expression) <default>: Relax ICE when encountering an unexpected tree code into a checking ICE guarded by flag_checking. Reviewed-by: Jason Merrill <ja...@redhat.com> (cherry picked from commit eeedc54cc81c4dfb472ecbd6f14cfbf2dd035474)