This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/84854] [7 Regression] ICE: unexpected expression in cxx_eval_constant_expression, at cp/constexpr.c:4774
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Mar 2018 14:14:39 +0000
- Subject: [Bug c++/84854] [7 Regression] ICE: unexpected expression in cxx_eval_constant_expression, at cp/constexpr.c:4774
- Auto-submitted: auto-generated
- References: <bug-84854-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84854
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu Mar 22 14:14:06 2018
New Revision: 258770
URL: https://gcc.gnu.org/viewcvs?rev=258770&root=gcc&view=rev
Log:
PR c++/84854
* semantics.c (finish_if_stmt_cond): Check if the type of the condition
is boolean.
* g++.dg/cpp1z/constexpr-if13.C: New test.
Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1z/constexpr-if13.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/semantics.c