* optimize.c (maybe_clone_body): Inc/dec function_depth.

From-SVN: r71210
This commit is contained in:
Richard Henderson 2003-09-08 09:54:13 -07:00 committed by Richard Henderson
parent f23fb7f525
commit c4bb110a19
2 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,10 @@
* pt.c (try_one_overload): Add addr_p parameter.
(resolve_overloaded_unification): Pass it.
2003-09-08 Richard Henderson <rth@redhat.com>
* optimize.c (maybe_clone_body): Inc/dec function_depth.
2003-09-08 Richard Henderson <rth@redhat.com>
* decl.c (finish_function): Clear current_function_decl.

View File

@ -130,6 +130,11 @@ maybe_clone_body (tree fn)
/* Emit the DWARF1 abstract instance. */
(*debug_hooks->deferred_inline_function) (fn);
/* 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++;
/* We know that any clones immediately follow FN in the TYPE_METHODS
list. */
for (clone = TREE_CHAIN (fn);
@ -253,6 +258,8 @@ maybe_clone_body (tree fn)
pop_from_top_level ();
}
function_depth--;
/* We don't need to process the original function any further. */
return 1;
}