* 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. Index: tree-ssa-forwprop.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/tree-ssa-forwprop.c,v retrieving revision 2.16 diff -c -p -r2.16 tree-ssa-forwprop.c *** tree-ssa-forwprop.c 17 May 2005 16:27:46 -0000 2.16 --- tree-ssa-forwprop.c 18 May 2005 16:47:50 -0000 *************** forward_propagate_addr_expr (tree stmt) *** 537,542 **** --- 537,547 ---- 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)