diff options
author | Jason Merrill <jason@redhat.com> | 2007-09-08 23:28:08 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2007-09-08 23:28:08 -0400 |
commit | fd452cefa9e28453d3ca5a7efa05facdda32e58f (patch) | |
tree | 7175c4ca1b56d9f34545d71673753565b6fbb687 /gcc/cp | |
parent | ba4807a0d37c0fae2caa5c18839a97e5004b2ffe (diff) | |
download | gcc-fd452cefa9e28453d3ca5a7efa05facdda32e58f.zip gcc-fd452cefa9e28453d3ca5a7efa05facdda32e58f.tar.gz gcc-fd452cefa9e28453d3ca5a7efa05facdda32e58f.tar.bz2 |
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: r128285
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b5229b3..ad342b6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index aafb964..e26958c 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13646,6 +13646,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); @@ -13661,6 +13663,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, |