OSDN Git Service

* tree-loop-distribution.c (tree_loop_distribution): Do not
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Jan 2011 13:25:17 +0000 (13:25 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Jan 2011 13:25:17 +0000 (13:25 +0000)
use freed memory.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168391 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-loop-distribution.c

index 665be0b..05f187e 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-01  Jan Hubicka  <jh@suse.cz>
+
+       * tree-loop-distribution.c (tree_loop_distribution): Do not
+       use freed memory.
+
 2011-01-01  Kai Tietz  <kai.tietz@onevision.com>
 
        PR target/38662
index 783c47c..5b147e3 100644 (file)
@@ -1214,6 +1214,7 @@ tree_loop_distribution (void)
   FOR_EACH_LOOP (li, loop, 0)
     {
       VEC (gimple, heap) *work_list = NULL;
+      int num = loop->num;
 
       /* If the loop doesn't have a single exit we will fail anyway,
         so do that early.  */
@@ -1255,9 +1256,9 @@ tree_loop_distribution (void)
        {
          if (nb_generated_loops > 1)
            fprintf (dump_file, "Loop %d distributed: split to %d loops.\n",
-                    loop->num, nb_generated_loops);
+                    num, nb_generated_loops);
          else
-           fprintf (dump_file, "Loop %d is the same.\n", loop->num);
+           fprintf (dump_file, "Loop %d is the same.\n", num);
        }
 
       verify_loop_structure ();