]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
decl.c (start_function): Don't call temporary_allocation for a nested function.
authorJim Wilson <wilson@cygnus.com>
Tue, 3 Mar 1998 00:55:34 +0000 (00:55 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 3 Mar 1998 00:55:34 +0000 (17:55 -0700)
        * decl.c (start_function): Don't call temporary_allocation for a
        nested function.

From-SVN: r18374

gcc/cp/ChangeLog
gcc/cp/decl.c

index fdb91d70939d23b2c182a27b55e36eb381ed6a1c..16f8dfd1116395fde564de46091112298ac2cf13 100644 (file)
@@ -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
index be2d504303bcdcaabf503e57817580d991a0220b..318d90975b9a172dbac594d5bf847d5441b18298 100644 (file)
@@ -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)