Commit 72ac12bf by Richard Henderson Committed by Richard Henderson

utils.c (end_subprog_body): Push GC context around rest_of_compilation for nested functions.

        * utils.c (end_subprog_body): Push GC context around
        rest_of_compilation for nested functions.

From-SVN: r48294
parent b6e22016
2001-12-23 Richard Henderson <rth@redhat.com> 2001-12-23 Richard Henderson <rth@redhat.com>
* utils.c (end_subprog_body): Push GC context around
rest_of_compilation for nested functions.
2001-12-23 Richard Henderson <rth@redhat.com>
* 5nosinte.ads: Get definition of "int" from Interfaces.C. * 5nosinte.ads: Get definition of "int" from Interfaces.C.
2001-12-23 Florian Weimer <fw@deneb.enyo.de> 2001-12-23 Florian Weimer <fw@deneb.enyo.de>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* * * *
* C Implementation File * * C Implementation File *
* * * *
* $Revision: 1.6 $ * $Revision: 1.7 $
* * * *
* Copyright (C) 1992-2001, Free Software Foundation, Inc. * * Copyright (C) 1992-2001, Free Software Foundation, Inc. *
* * * *
...@@ -1844,8 +1844,18 @@ end_subprog_body () ...@@ -1844,8 +1844,18 @@ end_subprog_body ()
DECL_CONTEXT (DECL_RESULT (current_function_decl)) = current_function_decl; DECL_CONTEXT (DECL_RESULT (current_function_decl)) = current_function_decl;
expand_function_end (input_filename, lineno, 0); expand_function_end (input_filename, lineno, 0);
/* If this is a nested function, push a new GC context. That will keep
local variables on the stack from being collected while we're doing
the compilation of this function. */
if (function_nesting_depth > 1)
ggc_push_context ();
rest_of_compilation (current_function_decl); rest_of_compilation (current_function_decl);
if (function_nesting_depth > 1)
ggc_pop_context ();
#if 0 #if 0
/* If we're sure this function is defined in this file then mark it /* If we're sure this function is defined in this file then mark it
as such */ as such */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment