summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>1998-03-03 00:55:34 +0000
committerJeff Law <law@gcc.gnu.org>1998-03-02 17:55:34 -0700
commitd2fbc2cacc472ab52cc5e5f4ad81984371a347c9 (patch)
treebf35cc4b723b2b94bd3b454681f8bd162824a781
parente8a96824e6f449b954e1c8f25977bf60e726f2f7 (diff)
downloadgcc-d2fbc2cacc472ab52cc5e5f4ad81984371a347c9.tar.gz
decl.c (start_function): Don't call temporary_allocation for a nested function.
* decl.c (start_function): Don't call temporary_allocation for a nested function. From-SVN: r18374
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fdb91d70939..16f8dfd1116 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+Tue Mar 3 01:58:11 1998 Jim Wilson <wilson@cygnus.com>
+
+ * decl.c (start_function): Don't call temporary_allocation for a
+ nested function.
+
Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index be2d504303b..318d90975b9 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -11615,8 +11615,11 @@ start_function (declspecs, declarator, attrs, pre_parsed_p)
TREE_THIS_VOLATILE (DECL_RESULT (decl1)) = TYPE_VOLATILE (restype);
}
- /* Allocate further tree nodes temporarily during compilation
- of this function only. Tiemann moved up here from bottom of fn. */
+ /* Allocate further tree nodes temporarily during compilation
+ of this function only. Tiemann moved up here from bottom of fn. */
+ /* If this is a nested function, then we must continue to allocate RTL
+ on the permanent obstack in case we need to inline it later. */
+ if (! hack_decl_function_context (decl1))
temporary_allocation ();
if (processing_template_decl)