OSDN Git Service

* decl.c (start_function): Don't call temporary_allocation for a
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Mar 1998 11:06:14 +0000 (11:06 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Mar 1998 11:06:14 +0000 (11:06 +0000)
nested function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18356 138bc75d-0d04-0410-961f-82ee72b054a4

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

index cf011cc..66d98cb 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 6d44bb0..e5ab625 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)