https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88983
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Fri Feb 1 00:30:46 2019 New Revision: 268438 URL: https://gcc.gnu.org/viewcvs?rev=268438&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. * g++.dg/cpp1y/constexpr-88983.C: New test. Added: trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-88983.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/constexpr.c trunk/gcc/testsuite/ChangeLog