------- Comment #9 from pinskia at gcc dot gnu dot org  2009-01-16 02:11 -------
Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c (revision 143415)
+++ tree-ssa-forwprop.c (working copy)
@@ -775,29 +775,43 @@ forward_propagate_addr_expr_1 (tree name
       && !TYPE_VOLATILE (TREE_TYPE (rhs))
       && !TYPE_VOLATILE (TREE_TYPE (TREE_OPERAND (def_rhs, 0)))
       && operand_equal_p (TYPE_SIZE (TREE_TYPE (rhs)),
-                         TYPE_SIZE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))),
0)) 
+                         TYPE_SIZE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))), 0)
+      /* Don't create a VCE inside an ADDR_EXPR which be used on the LHS later
+         on.  */
+      && gimple_assign_rhs_code (use_stmt) != ADDR_EXPR) 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38745

Reply via email to