]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/ChangeLog
PR c++/88983 - ICE with switch in constexpr function.
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Feb 2019 00:30:46 +0000 (00:30 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Feb 2019 00:30:46 +0000 (00:30 +0000)
commitf1329be60594951fb30fe859c6f0a86587b36bbd
tree80a02bf472408a511fef7f08648d67741d08a72c
parent74fa3048e4187905d6f7538f3e44e4f9fae68121
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268438 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/constexpr-88983.C [new file with mode: 0644]