re PR java/39940 (failure in jc1 on i686-apple-darwin9 host)
authorRichard Guenther <rguenther@suse.de>
Sat, 2 May 2009 17:50:21 +0000 (17:50 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 2 May 2009 17:50:21 +0000 (17:50 +0000)
2009-05-02  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/39940
* tree-ssa-pre.c (eliminate): Make sure we may propagate before
doing so.

From-SVN: r147065

gcc/ChangeLog
gcc/tree-ssa-pre.c

index d05e7cbda9765a42a0634f4fa890034c8dd59dda..0bba7cf543aa146311db07e5fca5f505cd689aeb 100644 (file)
@@ -1,3 +1,9 @@
+2009-05-02  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/39940
+       * tree-ssa-pre.c (eliminate): Make sure we may propagate before
+       doing so.
+
 2009-05-02  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/40001
index 11b88eddc36ac8f2d7f7b7b56c81332277c0d51b..3273c194981110023951889426e2c085e478a016 100644 (file)
@@ -4215,7 +4215,9 @@ eliminate (void)
       /* If there is a single use only, propagate the equivalency
         instead of keeping the copy.  */
       if (TREE_CODE (lhs) == SSA_NAME
-         && single_imm_use (lhs, &use_p, &use_stmt))
+         && single_imm_use (lhs, &use_p, &use_stmt)
+         && may_propagate_copy (USE_FROM_PTR (use_p),
+                                gimple_assign_rhs1 (stmt)))
        {
          SET_USE (use_p, gimple_assign_rhs1 (stmt));
          update_stmt (use_stmt);