re PR c++/12850 (memory consumption for heavy template instantiations tripled since...
authorJan Hubicka <jh@suse.cz>
Wed, 14 Jan 2004 11:34:37 +0000 (12:34 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 14 Jan 2004 11:34:37 +0000 (11:34 +0000)
PR c++/12850
* pt.c (instantiate_decl):  Do not increase function_depth.

From-SVN: r75859

gcc/cp/ChangeLog
gcc/cp/pt.c

index a538bf80ad862a2c14ba5379addac8c8d6475219..219f316877c2545a09917e23ae2bd4f07f9c5fb8 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-14  Jan Hubicka  <jh@suse.cz>
+
+       PR c++/12850
+       * pt.c (instantiate_decl):  Do not increase function_depth.
+
 2004-01-14  Danny Smith  <dannysmith@users,sourceforge.net>
 
        PR c++/9021
index cf73ea1f016bbb8d53c6479335d039886680e73f..faaeaa2f24c517c5ee709b1d4c0a52e925fd2f31 100644 (file)
@@ -10881,11 +10881,6 @@ instantiate_decl (tree d, int defer_ok)
   /* We may be in the middle of deferred access check.  Disable it now.  */
   push_deferring_access_checks (dk_no_deferred);
 
-  /* Our caller does not expect collection to happen, which it might if
-     we decide to compile the function to rtl now.  Arrange for a new
-     gc context to be created if so.  */
-  function_depth++;
-
   /* Set TD to the template whose DECL_TEMPLATE_RESULT is the pattern
      for the instantiation.  */
   td = template_for_substitution (d);
@@ -11129,7 +11124,6 @@ out:
   input_location = saved_loc;
   pop_deferring_access_checks ();
   pop_tinst_level ();
-  function_depth--;
 
   timevar_pop (TV_PARSE);