diff options
author | Richard Henderson <rth@redhat.com> | 2005-02-11 12:22:23 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-02-11 12:22:23 -0800 |
commit | fae6e24644e6d5f24fb5503cb607ddf7b242633b (patch) | |
tree | 3785d239e2bd4feff71a9cc172bd2eb01c9f3a6c /gcc/cp/pt.c | |
parent | d04b77acc8b7660ee15f53de421fe0523465fd4b (diff) | |
download | gcc-fae6e24644e6d5f24fb5503cb607ddf7b242633b.zip gcc-fae6e24644e6d5f24fb5503cb607ddf7b242633b.tar.gz gcc-fae6e24644e6d5f24fb5503cb607ddf7b242633b.tar.bz2 |
re PR c++/19634 (Infinite memory usage on Alpha)
PR c++/19632
* pt.c (get_mostly_instantiated_function_type): Save and restore
flag_access_control instead of push/pop_access_scope.
From-SVN: r94889
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index dbe560b..d484c8b 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11693,7 +11693,7 @@ get_mostly_instantiated_function_type (tree decl) ; else { - int i; + int i, save_access_control; tree partial_args; /* Replace the innermost level of the TARGS with NULL_TREEs to @@ -11706,12 +11706,10 @@ get_mostly_instantiated_function_type (tree decl) TMPL_ARGS_DEPTH (targs), make_tree_vec (DECL_NTPARMS (tmpl))); - /* Make sure that we can see identifiers, and compute access - correctly. We can just use the context of DECL for the - partial substitution here. It depends only on outer template - parameters, regardless of whether the innermost level is - specialized or not. */ - push_access_scope (decl); + /* Disable access control as this function is used only during + name-mangling. */ + save_access_control = flag_access_control; + flag_access_control = 0; ++processing_template_decl; /* Now, do the (partial) substitution to figure out the @@ -11726,7 +11724,7 @@ get_mostly_instantiated_function_type (tree decl) TREE_VEC_LENGTH (partial_args)--; tparms = tsubst_template_parms (tparms, partial_args, tf_error); - pop_access_scope (decl); + flag_access_control = save_access_control; } return fn_type; |