PR jit/63854: Fix leak of optimization_summary_obstack
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 19 Nov 2014 19:45:39 +0000 (19:45 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 19 Nov 2014 19:45:39 +0000 (19:45 +0000)
gcc/ChangeLog:
PR jit/63854
* ipa-reference.c (ipa_reference_c_finalize): Release
optimization_summary_obstack.

From-SVN: r217797

gcc/ChangeLog
gcc/ipa-reference.c

index e09ccd684c159f37a2bf07cd030e82aac4540e40..173fc1280cf660a028793d3cf13ca5acbfb1dff2 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-19  David Malcolm  <dmalcolm@redhat.com>
+
+       PR jit/63854
+       * ipa-reference.c (ipa_reference_c_finalize): Release
+       optimization_summary_obstack.
+
 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
 
        PR jit/63854
index b421f63fcb72bb56dcb3759e4ec29af1c15493bd..1ce06d126d63e6d733e61cbdf60d6e1460b2d9e3 100644 (file)
@@ -1193,5 +1193,9 @@ make_pass_ipa_reference (gcc::context *ctxt)
 void
 ipa_reference_c_finalize (void)
 {
-  ipa_init_p = false;
+  if (ipa_init_p)
+    {
+      bitmap_obstack_release (&optimization_summary_obstack);
+      ipa_init_p = false;
+    }
 }