PR c++/91545 - ICE in constexpr store evaluation.

* constexpr.c (cxx_eval_store_expression): Check FIELD_DECL instead
	of DECL_P.

	* g++.dg/cpp0x/pr91545.C: New test.

From-SVN: r274930
This commit is contained in:
Marek Polacek 2019-08-26 14:39:08 +00:00
parent d2ea2406cc
commit 7d349dd8e8
4 changed files with 19 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2019-08-26 Marek Polacek <polacek@redhat.com>
PR c++/91545 - ICE in constexpr store evaluation.
* constexpr.c (cxx_eval_store_expression): Check FIELD_DECL instead
of DECL_P.
2019-08-24 Nathan Sidwell <nathan@acm.org>
* class.c (check_for_overrides): Conversion operators need

View file

@ -3849,7 +3849,7 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t,
{
tree ob = TREE_OPERAND (probe, 0);
tree elt = TREE_OPERAND (probe, 1);
if (DECL_P (elt) && DECL_MUTABLE_P (elt))
if (TREE_CODE (elt) == FIELD_DECL && DECL_MUTABLE_P (elt))
mutable_p = true;
if (evaluated
&& modifying_const_object_p (TREE_CODE (t), probe, mutable_p)

View file

@ -1,3 +1,8 @@
2019-08-26 Marek Polacek <polacek@redhat.com>
PR c++/91545 - ICE in constexpr store evaluation.
* g++.dg/cpp0x/pr91545.C: New test.
2019-08-26 Tejas Joshi <tejasjoshi9673@gmail.com>
* gcc.target/i386/sse4_1-round-roundeven-1.c: New test.
@ -5,8 +10,8 @@
2019-08-26 Tejas Joshi <tejasjoshi9673@gmail.com>
* gcc.dg/torture/builtin-round-roundeven.c: New test.
* gcc.dg/torture/builtin-round-roundevenf128.c: Likewise.
* gcc.dg/torture/builtin-round-roundeven.c: New test.
* gcc.dg/torture/builtin-round-roundevenf128.c: Likewise.
2019-08-26 Robin Dapp <rdapp@linux.ibm.com>

View file

@ -0,0 +1,5 @@
// PR c++/91545
// { dg-do compile { target c++11 } }
long a[1];
int d, e { d && (a[d] = 0) };