diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/function.c | 2 | ||||
-rw-r--r-- | gcc/integrate.c | 8 | ||||
-rw-r--r-- | gcc/toplev.c | 8 |
4 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 27717bb..259a22a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/function.c b/gcc/function.c index ae19e07a..f2beb9f 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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. */ diff --git a/gcc/integrate.c b/gcc/integrate.c index 232f5fe..cdf368e 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -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; diff --git a/gcc/toplev.c b/gcc/toplev.c index 50699e6..f9f02f3 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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 (); |