diff options
| author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-04 19:48:22 +0000 |
|---|---|---|
| committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-04 19:48:22 +0000 |
| commit | 110c157e53daef8f9195f536aec16fd83d03e830 (patch) | |
| tree | 69d634a7730e9df14e91a4d51a6c844a166814eb | |
| parent | e409e1ba57bd3a374f56a10cd021b402b671e111 (diff) | |
| download | ppe42-gcc-110c157e53daef8f9195f536aec16fd83d03e830.tar.gz ppe42-gcc-110c157e53daef8f9195f536aec16fd83d03e830.zip | |
PR 12161
* decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
* tree.c (cp_cannot_inline_tree_fn): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71084 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/cp/decl2.c | 3 | ||||
| -rw-r--r-- | gcc/cp/tree.c | 9 |
3 files changed, 18 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3c3112dc525..ca8ea06d7fc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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> * cp-tree.h (finish_sizeof, finish_alignof): Remove. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index d74f2907424..7ca20c8ef30 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4226,7 +4226,10 @@ mark_used (tree decl) information. */ || cp_function_chain->can_throw); + /* Our caller is likely to have lots of data on the stack. */ + ggc_push_context (); instantiate_decl (decl, defer); + ggc_pop_context (); } } diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 71742a7bba7..1dddad4933d 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1992,7 +1992,16 @@ cp_cannot_inline_tree_fn (tree* fnp) if (!DECL_INLINE (DECL_TEMPLATE_RESULT (template_for_substitution (fn)))) 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); + + ggc_pop_context(); + if (TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn))) return 1; } |

