Commit 1a9861e6 by Geoffrey Keating Committed by Geoffrey Keating

re PR c++/12161 (ICE during bootstrap, locale-inst.c, cp/call.c: 4571)

	PR 12161
	* decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
	* tree.c (cp_cannot_inline_tree_fn): Likewise.

From-SVN: r71084
parent 33d05111
2003-09-02 Geoffrey Keating <geoffk@apple.com>
PR 12161
* decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
* tree.c (cp_cannot_inline_tree_fn): Likewise.
2003-09-04 Nathan Sidwell <nathan@codesourcery.com> 2003-09-04 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (finish_sizeof, finish_alignof): Remove. * cp-tree.h (finish_sizeof, finish_alignof): Remove.
......
...@@ -4226,7 +4226,10 @@ mark_used (tree decl) ...@@ -4226,7 +4226,10 @@ mark_used (tree decl)
information. */ information. */
|| cp_function_chain->can_throw); || cp_function_chain->can_throw);
/* Our caller is likely to have lots of data on the stack. */
ggc_push_context ();
instantiate_decl (decl, defer); instantiate_decl (decl, defer);
ggc_pop_context ();
} }
} }
......
...@@ -1992,7 +1992,16 @@ cp_cannot_inline_tree_fn (tree* fnp) ...@@ -1992,7 +1992,16 @@ cp_cannot_inline_tree_fn (tree* fnp)
if (!DECL_INLINE (DECL_TEMPLATE_RESULT if (!DECL_INLINE (DECL_TEMPLATE_RESULT
(template_for_substitution (fn)))) (template_for_substitution (fn))))
return 1; return 1;
/* Our caller does not expect us to call ggc_collect, but
instantiate_decl can call rest_of_compilation so we must
protect our caller. */
ggc_push_context();
fn = *fnp = instantiate_decl (fn, /*defer_ok=*/0); fn = *fnp = instantiate_decl (fn, /*defer_ok=*/0);
ggc_pop_context();
if (TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn))) if (TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn)))
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment