decl.c (start_function): Don't call temporary_allocation for a nested function.
authorJim Wilson <wilson@cygnus.com>
Mon, 2 Mar 1998 11:06:14 +0000 (11:06 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 2 Mar 1998 11:06:14 +0000 (06:06 -0500)
* decl.c (start_function): Don't call temporary_allocation for a
nested function.

From-SVN: r18356

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

index cf011cc396787c46b381e86e6e598db1500f4ba5..66d98cbc9135801e1cf0adae16b300a1b4603bed 100644 (file)
@@ -1,3 +1,8 @@
+Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
+
+       * decl.c (start_function): Don't call temporary_allocation for a
+       nested function.
+
 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
        * pt.c (instantiate_class_template): Don't mess with friends if
index 6d44bb0f9904f097925cc18eddb6ec627283f149..e5ab625e7232cc07f58720f3dcaf1a1d3d6fa6b4 100644 (file)
@@ -11916,8 +11916,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)