re PR rtl-optimization/53706 (Bootstrap failure due to "Invalid write of size 8 at...
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 28 Jun 2012 07:39:51 +0000 (07:39 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 28 Jun 2012 07:39:51 +0000 (07:39 +0000)
PR debug/53706
PR debug/47624
* var-tracking.c (vt_emit_notes): Release loc_exp_dep_pool...
(vt_finalize): ... here instead, if needed.

From-SVN: r189037

gcc/ChangeLog
gcc/var-tracking.c

index 9b5a0f317d2f2a0364fd426fcdd7296cb54de706..dd228e8cf73ddba3b7335deea588a30ebfbe6a34 100644 (file)
@@ -1,3 +1,12 @@
+2012-06-28  Alexandre Oliva  <aoliva@redhat.com>,
+            Uros Bizjak  <ubizjak@gmail.com>,
+            Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/53706
+       PR debug/47624
+       * var-tracking.c (vt_emit_notes): Release loc_exp_dep_pool...
+       (vt_finalize): ... here instead, if needed.
+
 2012-06-28  Alexandre Oliva  <aoliva@redhat.com>
 
        PR debug/53740
index be638d7ca25c38149fc8a861edba372d006bb86f..66ce35a00954d46db3482909a362295d31d2b03a 100644 (file)
@@ -9260,11 +9260,7 @@ vt_emit_notes (void)
   dataflow_set_destroy (&cur);
 
   if (MAY_HAVE_DEBUG_INSNS)
-    {
-      free_alloc_pool (loc_exp_dep_pool);
-      loc_exp_dep_pool = NULL;
-      htab_delete (dropped_values);
-    }
+    htab_delete (dropped_values);
 
   emit_notes = false;
 }
@@ -9974,6 +9970,9 @@ vt_finalize (void)
 
   if (MAY_HAVE_DEBUG_INSNS)
     {
+      if (loc_exp_dep_pool)
+       free_alloc_pool (loc_exp_dep_pool);
+      loc_exp_dep_pool = NULL;
       free_alloc_pool (valvar_pool);
       VEC_free (rtx, heap, preserved_values);
       cselib_finish ();