re PR c++/33342 (ICE in dependent_type_p, at cp/pt.c:15081)
authorJason Merrill <jason@redhat.com>
Sun, 9 Sep 2007 03:28:08 +0000 (23:28 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 9 Sep 2007 03:28:08 +0000 (23:28 -0400)
        PR c++/33342
        * pt.c (most_specialized_class): Set processing_template_decl
        while tsubsting partial spec args.

From-SVN: r128285

gcc/cp/ChangeLog
gcc/cp/pt.c

index b5229b3814df68bc48a535e2fe2758ea6a60bcce..ad342b6e78527ca7cbc196c37ecd5458dd89aa67 100644 (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.
index aafb964f3c34813ea4cbf512b2624421d80bc986..e26958cb7b8d71d9c460ebd52b3594efe13400a3 100644 (file)
@@ -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,