re PR tree-optimization/45073 (gfortran.dg/assumed_charlen_function_3.f90 ICEs with...
authorRichard Guenther <rguenther@suse.de>
Mon, 26 Jul 2010 14:48:43 +0000 (14:48 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 26 Jul 2010 14:48:43 +0000 (14:48 +0000)
2010-07-26  Richard Guenther  <rguenther@suse.de>

PR middle-end/45073
* gimple-fold.c (gimplify_and_update_call_from_tree): Conditionalize
SSA updating on being in SSA form.

From-SVN: r162537

gcc/ChangeLog
gcc/gimple-fold.c

index 1b32e5051e0e7b1247981a2f98a4843fb217de9f..66a86e5c73127128214c9734ba49533f10340c7d 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-26  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/45073
+       * gimple-fold.c (gimplify_and_update_call_from_tree): Conditionalize
+       SSA updating on being in SSA form.
+
 2010-07-26  Richard Guenther  <rguenther@suse.de>
 
        PR middle-end/45056
index 5953d6a7593c7f96f01b4d8dd5ebe157bb3ad770..a5301bad5ed726cb0089bdaba016d118b8afb51c 100644 (file)
@@ -853,8 +853,11 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
          gsi_next (si_p);
        }
       new_stmt = gsi_stmt (i);
-      find_new_referenced_vars (new_stmt);
-      mark_symbols_for_renaming (new_stmt);
+      if (gimple_in_ssa_p (cfun))
+       {
+         find_new_referenced_vars (new_stmt);
+         mark_symbols_for_renaming (new_stmt);
+       }
       /* If the new statement has a VUSE, update it with exact SSA name we
          know will reach this one.  */
       if (gimple_vuse (new_stmt))
@@ -892,7 +895,7 @@ gimplify_and_update_call_from_tree (gimple_stmt_iterator *si_p, tree expr)
            SSA_NAME_DEF_STMT (gimple_vdef (stmt)) = laststore;
          update_stmt (laststore);
        }
-      else
+      else if (gimple_in_ssa_p (cfun))
        {
          unlink_stmt_vdef (stmt);
          release_defs (stmt);