Commit 26de0bcb by Andrew Pinski Committed by Andrew Pinski

re PR middle-end/30142 ([meta-bug] invalid gimple)

2009-01-01  Andrew Pinski  <pinskia@gmail.com>

        PR middle-end/30142
        * tree-cfg.c (verify_expr): Add INDIRECT_REF case.  Change MODIFY_EXPR
        case to be an error.

From-SVN: r143001
parent 7a7d8fab
2009-01-01 Andrew Pinski <pinskia@gmail.com>
PR middle-end/30142
* tree-cfg.c (verify_expr): Add INDIRECT_REF case. Change MODIFY_EXPR
case to be an error.
2009-01-02 Ben Elliston <bje@au.ibm.com> 2009-01-02 Ben Elliston <bje@au.ibm.com>
* config/fp-bit.h (pack_d): Constify argument. * config/fp-bit.h (pack_d): Constify argument.
...@@ -2805,6 +2805,15 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) ...@@ -2805,6 +2805,15 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
} }
break; break;
case INDIRECT_REF:
x = TREE_OPERAND (t, 0);
if (!is_gimple_reg (x) && !is_gimple_min_invariant (x))
{
error ("Indirect reference's operand is not a register or a constant.");
return x;
}
break;
case ASSERT_EXPR: case ASSERT_EXPR:
x = fold (ASSERT_EXPR_COND (t)); x = fold (ASSERT_EXPR_COND (t));
if (x == boolean_false_node) if (x == boolean_false_node)
...@@ -2815,14 +2824,8 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) ...@@ -2815,14 +2824,8 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
break; break;
case MODIFY_EXPR: case MODIFY_EXPR:
x = TREE_OPERAND (t, 0); error ("MODIFY_EXPR not expected while having tuples.");
if (TREE_CODE (x) == BIT_FIELD_REF return x;
&& is_gimple_reg (TREE_OPERAND (x, 0)))
{
error ("GIMPLE register modified with BIT_FIELD_REF");
return t;
}
break;
case ADDR_EXPR: case ADDR_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