+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.
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))
{
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)
}
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)
return true;
}
- return verify_types_in_gimple_reference (op);
+ return verify_types_in_gimple_reference (op, true);
}
/* tcc_reference */
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: