aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-03-22 19:50:48 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-03-22 19:50:48 +0000
commit1b738915e844455ed10082d9b6edab47eb7a9fd8 (patch)
treec9b8763f12945bb2583d2c8852e671a6703b967f /gcc/tree-cfg.c
parent18b526e806ab64557cd575ff407fcb1da16ee8fd (diff)
downloadgcc-1b738915e844455ed10082d9b6edab47eb7a9fd8.zip
gcc-1b738915e844455ed10082d9b6edab47eb7a9fd8.tar.gz
gcc-1b738915e844455ed10082d9b6edab47eb7a9fd8.tar.bz2
tree-cfg.c (verify_expr): Recurse again for invariant addresses.
2008-03-22 Richard Guenther <rguenther@suse.de> * tree-cfg.c (verify_expr): Recurse again for invariant addresses. For PHI nodes verify the address is invariant. * tree-ssa-ccp.c (ccp_decl_initial_min_invariant): Remove. (get_symbol_constant_value): Use is_gimple_min_invariant. (maybe_fold_stmt_indirect): Likewise. From-SVN: r133453
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index c4b9bff..6c4b311 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3172,7 +3172,14 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
we may be missing "valid" checks, but what can you do?
This was PR19217. */
if (in_phi)
- break;
+ {
+ if (!is_gimple_min_invariant (t))
+ {
+ error ("non-invariant address expression in PHI argument");
+ return t;
+ }
+ break;
+ }
old_invariant = TREE_INVARIANT (t);
old_constant = TREE_CONSTANT (t);
@@ -3216,10 +3223,6 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
return x;
}
- /* Stop recursing and verifying invariant ADDR_EXPRs, they tend
- to become arbitrary complicated. */
- if (is_gimple_min_invariant (t))
- *walk_subtrees = 0;
break;
}