Commit 931002b2 by Richard Biener Committed by Richard Biener

gimplify.c (gimplify_init_constructor): Do not leave non-GIMPLE vector constructors around.

2014-09-22  Richard Biener  <rguenther@suse.de>

	* gimplify.c (gimplify_init_constructor): Do not leave
	non-GIMPLE vector constructors around.
	* tree-cfg.c (verify_gimple_assign_single): Verify that
	CONSTRUCTORs have gimple elements.

From-SVN: r215461
parent 1a849e50
2014-09-22 Richard Biener <rguenther@suse.de>
* gimplify.c (gimplify_init_constructor): Do not leave
non-GIMPLE vector constructors around.
* tree-cfg.c (verify_gimple_assign_single): Verify that
CONSTRUCTORs have gimple elements.
2014-09-22 Jakub Jelinek <jakub@redhat.com> 2014-09-22 Jakub Jelinek <jakub@redhat.com>
PR debug/63328 PR debug/63328
...@@ -4021,12 +4021,6 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, ...@@ -4021,12 +4021,6 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
break; break;
} }
/* Don't reduce an initializer constant even if we can't
make a VECTOR_CST. It won't do anything for us, and it'll
prevent us from representing it as a single constant. */
if (initializer_constant_valid_p (ctor, type))
break;
TREE_CONSTANT (ctor) = 0; TREE_CONSTANT (ctor) = 0;
} }
......
...@@ -4207,8 +4207,20 @@ verify_gimple_assign_single (gimple stmt) ...@@ -4207,8 +4207,20 @@ verify_gimple_assign_single (gimple stmt)
debug_generic_stmt (rhs1); debug_generic_stmt (rhs1);
return true; return true;
} }
if (!is_gimple_val (elt_v))
{
error ("vector CONSTRUCTOR element is not a GIMPLE value");
debug_generic_stmt (rhs1);
return true;
}
} }
} }
else if (CONSTRUCTOR_NELTS (rhs1) != 0)
{
error ("non-vector CONSTRUCTOR with elements");
debug_generic_stmt (rhs1);
return true;
}
return res; return res;
case OBJ_TYPE_REF: case OBJ_TYPE_REF:
case ASSERT_EXPR: case ASSERT_EXPR:
......
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