https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88983
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Wed Feb 6 15:29:14 2019 New Revision: 268581 URL: https://gcc.gnu.org/viewcvs?rev=268581&root=gcc&view=rev Log: PR c++/88983 - ICE with switch in constexpr function. * constexpr.c (cxx_eval_switch_expr): Use SWITCH_COND and SWITCH_BODY. (cxx_eval_constant_expression) <case COND_EXPR>: Don't look for the label in the else branch if we found it in the then branch. Added: branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1y/constexpr-88983.C Modified: branches/gcc-8-branch/gcc/cp/ChangeLog branches/gcc-8-branch/gcc/cp/constexpr.c