diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-24 01:47:10 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-24 01:47:10 +0000 |
commit | 3ae29d01f175312edfd0c6d6c20f5bb95db0f1d8 (patch) | |
tree | b37a87a99944963c71884b215fa3a08b68ee91de /gcc/ada | |
parent | 049fd827f06d7e4136d21835197e08b7731deb6c (diff) | |
download | gcc-3ae29d01f175312edfd0c6d6c20f5bb95db0f1d8.tar.gz |
* utils.c (end_subprog_body): Push GC context around
rest_of_compilation for nested functions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48294 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/utils.c | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 423ef8a4aa7..20a7cdf579e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 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. 2001-12-23 Florian Weimer <fw@deneb.enyo.de> diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 8f1f3419b1a..ead4d02d83b 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * * * Copyright (C) 1992-2001, Free Software Foundation, Inc. * * * @@ -1844,8 +1844,18 @@ end_subprog_body () DECL_CONTEXT (DECL_RESULT (current_function_decl)) = current_function_decl; 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); + if (function_nesting_depth > 1) + ggc_pop_context (); + #if 0 /* If we're sure this function is defined in this file then mark it as such */ |