Commit 276a52d5 by Jakub Jelinek Committed by Jakub Jelinek

constexpr.c (cxx_eval_store_expression): Formatting fix.

	* constexpr.c (cxx_eval_store_expression): Formatting fix.  Handle
	const_object_being_modified with array type.

From-SVN: r276493
parent bead5784
2019-10-03 Jakub Jelinek <jakub@redhat.com>
* constexpr.c (cxx_eval_store_expression): Formatting fix. Handle
const_object_being_modified with array type.
2019-10-02 Jason Merrill <jason@redhat.com> 2019-10-02 Jason Merrill <jason@redhat.com>
* typeck2.c (store_init_value): Only clear_cv_and_fold_caches if the * typeck2.c (store_init_value): Only clear_cv_and_fold_caches if the
......
...@@ -3895,7 +3895,7 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t, ...@@ -3895,7 +3895,7 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t,
bool no_zero_init = true; bool no_zero_init = true;
releasing_vec ctors; releasing_vec ctors;
while (!refs->is_empty()) while (!refs->is_empty ())
{ {
if (*valp == NULL_TREE) if (*valp == NULL_TREE)
{ {
...@@ -4036,7 +4036,9 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t, ...@@ -4036,7 +4036,9 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t,
if (const_object_being_modified) if (const_object_being_modified)
{ {
bool fail = false; bool fail = false;
if (!CLASS_TYPE_P (TREE_TYPE (const_object_being_modified))) tree const_objtype
= strip_array_types (TREE_TYPE (const_object_being_modified));
if (!CLASS_TYPE_P (const_objtype))
fail = true; fail = true;
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment