On 10/11/2013 08:29 PM, Paolo Carlini wrote:
Are we maybe failing to bump processing_template_decl somewhere while processing the specialization?
... I'm finishing testing this, already past g++.dg/dg.exp...

Paolo.
Index: cp/pt.c
===================================================================
--- cp/pt.c     (revision 203449)
+++ cp/pt.c     (working copy)
@@ -18594,10 +18594,15 @@ most_specialized_class (tree type, tree tmpl, tsub
       if (spec_tmpl == error_mark_node)
        return error_mark_node;
 
+      ++processing_template_decl;
+
       tree parms = DECL_INNERMOST_TEMPLATE_PARMS (spec_tmpl);
       spec_args = get_class_bindings (tmpl, parms,
                                      partial_spec_args,
                                      args);
+
+      --processing_template_decl;
+
       if (spec_args)
        {
          if (outer_args)
Index: testsuite/g++.dg/cpp0x/variadic145.C
===================================================================
--- testsuite/g++.dg/cpp0x/variadic145.C        (revision 0)
+++ testsuite/g++.dg/cpp0x/variadic145.C        (working copy)
@@ -0,0 +1,10 @@
+// PR c++/58466
+// { dg-do compile { target c++11 } }
+
+template<char, char...> struct A;
+
+template<typename> struct B;
+
+template<char... C> struct B<A<C...>> {};
+
+B<A<'X'>> b;        // { dg-error "incomplete type" }

Reply via email to