]> gcc.gnu.org Git - gcc.git/commit - gcc/cp/constexpr.cc
PR c++/88983 - ICE with switch in constexpr function.
authorMarek Polacek <polacek@redhat.com>
Fri, 1 Feb 2019 00:30:46 +0000 (00:30 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 1 Feb 2019 00:30:46 +0000 (00:30 +0000)
commite9fa2f6ded6a0d7aeb43a0818930d73704626cc7
tree80a02bf472408a511fef7f08648d67741d08a72c
parentbb9160aeb0a10681b1328f097fa5c9be6264d88f
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.

From-SVN: r268438
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-88983.C [new file with mode: 0644]
This page took 0.062751 seconds and 5 git commands to generate.