Commit fae6e246 by Richard Henderson Committed by Richard Henderson

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
parent d04b77ac
2005-02-11 Richard Henderson <rth@redhat.com>
PR c++/19632
* pt.c (get_mostly_instantiated_function_type): Save and restore
flag_access_control instead of push/pop_access_scope.
2005-02-10 Mark Mitchell <mark@codesourcery.com> 2005-02-10 Mark Mitchell <mark@codesourcery.com>
PR c++/19755 PR c++/19755
......
...@@ -11693,7 +11693,7 @@ get_mostly_instantiated_function_type (tree decl) ...@@ -11693,7 +11693,7 @@ get_mostly_instantiated_function_type (tree decl)
; ;
else else
{ {
int i; int i, save_access_control;
tree partial_args; tree partial_args;
/* Replace the innermost level of the TARGS with NULL_TREEs to /* Replace the innermost level of the TARGS with NULL_TREEs to
...@@ -11706,12 +11706,10 @@ get_mostly_instantiated_function_type (tree decl) ...@@ -11706,12 +11706,10 @@ get_mostly_instantiated_function_type (tree decl)
TMPL_ARGS_DEPTH (targs), TMPL_ARGS_DEPTH (targs),
make_tree_vec (DECL_NTPARMS (tmpl))); make_tree_vec (DECL_NTPARMS (tmpl)));
/* Make sure that we can see identifiers, and compute access /* Disable access control as this function is used only during
correctly. We can just use the context of DECL for the name-mangling. */
partial substitution here. It depends only on outer template save_access_control = flag_access_control;
parameters, regardless of whether the innermost level is flag_access_control = 0;
specialized or not. */
push_access_scope (decl);
++processing_template_decl; ++processing_template_decl;
/* Now, do the (partial) substitution to figure out the /* Now, do the (partial) substitution to figure out the
...@@ -11726,7 +11724,7 @@ get_mostly_instantiated_function_type (tree decl) ...@@ -11726,7 +11724,7 @@ get_mostly_instantiated_function_type (tree decl)
TREE_VEC_LENGTH (partial_args)--; TREE_VEC_LENGTH (partial_args)--;
tparms = tsubst_template_parms (tparms, partial_args, tf_error); tparms = tsubst_template_parms (tparms, partial_args, tf_error);
pop_access_scope (decl); flag_access_control = save_access_control;
} }
return fn_type; return fn_type;
......
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