summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-forwprop.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-18 16:49:49 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-18 16:49:49 +0000
commitfb3f413ca11a192b595eacf552f98dfd9dd236a7 (patch)
tree4887c3d9b25e73017920c2b4fc1c76a1056c4897 /gcc/tree-ssa-forwprop.c
parent9f7b18076b94cbd0b3a5bffdce7c66c242b99f7a (diff)
downloadgcc-fb3f413ca11a192b595eacf552f98dfd9dd236a7.tar.gz
* tree-ssa-forwprop.c (forward_propagate_addr_expr): Do not
propagate an ADDR_EXPR if the definition and use sites are in different EH regions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99906 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r--gcc/tree-ssa-forwprop.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index fb3dcaf6ea8..f65df577cb3 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -537,6 +537,11 @@ forward_propagate_addr_expr (tree stmt)
if (bb_for_stmt (use_stmt)->loop_depth > stmt_loop_depth)
return false;
+ /* If the two statements belong to different EH regions, then there
+ is nothing we can or should try to do. */
+ if (lookup_stmt_eh_region (use_stmt) != lookup_stmt_eh_region (stmt))
+ return false;
+
/* Strip away any outer COMPONENT_REF/ARRAY_REF nodes from the LHS. */
lhs = TREE_OPERAND (use_stmt, 0);
while (TREE_CODE (lhs) == COMPONENT_REF || TREE_CODE (lhs) == ARRAY_REF)