* function.c (ggc_mark_struct_function): Mark f->outer.
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Sep 2001 17:48:26 +0000 (17:48 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Sep 2001 17:48:26 +0000 (17:48 +0000)
* toplev.c (rest_of_compilation): Clear DECL_SAVED_INSNS here...
* integrate.c (output_inline_function): ... not here.

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

gcc/ChangeLog
gcc/function.c
gcc/integrate.c
gcc/toplev.c

index 27717bb..259a22a 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-05  Zack Weinberg  <zack@codesourcery.com>
+
+       * function.c (ggc_mark_struct_function): Mark f->outer.
+       * toplev.c (rest_of_compilation): Clear DECL_SAVED_INSNS here...
+       * integrate.c (output_inline_function): ... not here.
+
 Wed Sep  5 17:28:49 CEST 2001  Jan Hubicka  <jh@suse.cz>
 
        * profile.c (branch_prob): Call add_noreturn_fake_exit_edges.
index ae19e07..f2beb9f 100644 (file)
@@ -7706,6 +7706,8 @@ ggc_mark_struct_function (f)
     ggc_mark_rtvec ((rtvec) f->original_arg_vector);
   if (f->original_decl_initial)
     ggc_mark_tree (f->original_decl_initial);
+  if (f->outer)
+    ggc_mark_struct_function (f->outer);
 }
 
 /* Called once, at initialization, to initialize function.c.  */
index 232f5fe..cdf368e 100644 (file)
@@ -2899,13 +2899,11 @@ output_inline_function (fndecl)
      before it gets mangled by optimization.  */
   (*debug_hooks->outlining_inline_function) (fndecl);
 
-  /* Compile this function all the way down to assembly code.  */
+  /* Compile this function all the way down to assembly code.  As a
+     side effect this destroys the saved RTL representation, but
+     that's okay, because we don't need to inline this anymore.  */
   rest_of_compilation (fndecl);
-
-  /* We can't inline this anymore; rest_of_compilation destroyed the
-     data structures describing the function.  */
   DECL_INLINE (fndecl) = 0;
-  DECL_SAVED_INSNS (fndecl) = 0;
 
   cfun = old_cfun;
   current_function_decl = old_cfun ? old_cfun->decl : 0;
index 50699e6..f9f02f3 100644 (file)
@@ -3773,7 +3773,13 @@ rest_of_compilation (decl)
   /* We're done with this function.  Free up memory if we can.  */
   free_after_parsing (cfun);
   if (! DECL_DEFER_OUTPUT (decl))
-    free_after_compilation (cfun);
+    {
+      free_after_compilation (cfun);
+
+      /* Clear integrate.c's pointer to the cfun structure we just
+        destroyed.  */
+      DECL_SAVED_INSNS (decl) = 0;
+    }
   cfun = 0;
 
   ggc_collect ();