re PR c++/33342 (ICE in dependent_type_p, at cp/pt.c:15081)

PR c++/33342
        * pt.c (most_specialized_class): Set processing_template_decl
        while tsubsting partial spec args.

From-SVN: r128304
This commit is contained in:
Jason Merrill
2007-09-09 14:58:52 -04:00
committed by Jason Merrill
parent ab4f5e0d81
commit 4da7cb74e3
2 changed files with 10 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2007-09-08 Jason Merrill <jason@redhat.com>
PR c++/33342
* pt.c (most_specialized_class): Set processing_template_decl
while tsubsting partial spec args.
2007-09-06 Jason Merrill <jason@redhat.com>
* decl2.c (get_guard): Copy visibility from the guarded variable.

View File

@@ -11576,6 +11576,8 @@ most_specialized_class (tree type, tree tmpl)
{
int i;
++processing_template_decl;
/* Discard the outer levels of args, and then substitute in the
template args from the enclosing class. */
partial_spec_args = INNERMOST_TEMPLATE_ARGS (partial_spec_args);
@@ -11591,6 +11593,8 @@ most_specialized_class (tree type, tree tmpl)
for (i = TREE_VEC_LENGTH (parms) - 1; i >= 0; --i)
TREE_VEC_ELT (parms, i) =
tsubst (TREE_VEC_ELT (parms, i), outer_args, tf_none, NULL_TREE);
--processing_template_decl;
}
spec_args = get_class_bindings (parms,
partial_spec_args,