Commit 3a19701a by Richard Guenther Committed by Richard Biener

tree-cfg.c (verify_types_in_gimple_reference): Add require_lvalue parameter.

2009-04-29  Richard Guenther  <rguenther@suse.de>

	* tree-cfg.c (verify_types_in_gimple_reference): Add require_lvalue
	parameter.  Allow invariants as base if !require_lvalue.
	(verify_gimple_assign_single): Adjust.

From-SVN: r146947
parent 9ddffe32
2009-04-29 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (verify_types_in_gimple_reference): Add require_lvalue
parameter. Allow invariants as base if !require_lvalue.
(verify_gimple_assign_single): Adjust.
2009-04-29 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.md (sp_or_sm, spm_string, spm_name): New macro.
......
......@@ -3135,11 +3135,12 @@ verify_types_in_gimple_min_lval (tree expr)
return false;
}
/* Verify if EXPR is a valid GIMPLE reference expression. Returns true
/* Verify if EXPR is a valid GIMPLE reference expression. If
REQUIRE_LVALUE is true verifies it is an lvalue. Returns true
if there is an error, otherwise false. */
static bool
verify_types_in_gimple_reference (tree expr)
verify_types_in_gimple_reference (tree expr, bool require_lvalue)
{
while (handled_component_p (expr))
{
......@@ -3211,7 +3212,8 @@ verify_types_in_gimple_reference (tree expr)
expr = op;
}
return verify_types_in_gimple_min_lval (expr);
return ((require_lvalue || !is_gimple_min_invariant (expr))
&& verify_types_in_gimple_min_lval (expr));
}
/* Returns true if there is one pointer type in TYPE_POINTER_TO (SRC_OBJ)
......@@ -3747,7 +3749,7 @@ verify_gimple_assign_single (gimple stmt)
}
if (handled_component_p (lhs))
res |= verify_types_in_gimple_reference (lhs);
res |= verify_types_in_gimple_reference (lhs, true);
/* Special codes we cannot handle via their class. */
switch (rhs_code)
......@@ -3770,7 +3772,7 @@ verify_gimple_assign_single (gimple stmt)
return true;
}
return verify_types_in_gimple_reference (op);
return verify_types_in_gimple_reference (op, true);
}
/* tcc_reference */
......@@ -3793,7 +3795,7 @@ verify_gimple_assign_single (gimple stmt)
debug_generic_stmt (rhs1);
return true;
}
return res || verify_types_in_gimple_reference (rhs1);
return res || verify_types_in_gimple_reference (rhs1, false);
/* tcc_constant */
case SSA_NAME:
......
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