OSDN Git Service

PR c++/50303
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Apr 2012 14:10:54 +0000 (14:10 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Apr 2012 14:10:54 +0000 (14:10 +0000)
* pt.c (tsubst_pack_expansion): Use tsubst_expr for template
template parameters.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@186531 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/variadic128.C [new file with mode: 0644]

index a548604..d5bbaee 100644 (file)
@@ -1,3 +1,9 @@
+2012-04-16  Jason Merrill  <jason@redhat.com>
+
+       PR c++/50303
+       * pt.c (tsubst_pack_expansion): Use tsubst_expr for template
+       template parameters.
+
 2012-04-15  Jason Merrill  <jason@redhat.com>
 
        PR c++/52292
index 3c8fea2..ea20323 100644 (file)
@@ -9563,7 +9563,7 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
         }
 
       /* Substitute into the PATTERN with the altered arguments.  */
-      if (TREE_CODE (t) == EXPR_PACK_EXPANSION)
+      if (!TYPE_P (pattern))
         TREE_VEC_ELT (result, i) = 
           tsubst_expr (pattern, args, complain, in_decl,
                        /*integral_constant_expression_p=*/false);
index e4fe97c..0c72e98 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-16  Jason Merrill  <jason@redhat.com>
+
+       PR c++/50303
+       * g++.dg/cpp0x/variadic128.C: New.
+
 2012-04-16  Uros Bizjak  <ubizjak@gmail.com>
 
        Backport from mainline
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic128.C b/gcc/testsuite/g++.dg/cpp0x/variadic128.C
new file mode 100644 (file)
index 0000000..8c2d3b2
--- /dev/null
@@ -0,0 +1,16 @@
+// PR c++/50303
+// { dg-do compile { target c++11 } }
+
+template<typename Interface>
+struct A1 {
+};
+
+template<template<class I> class... Actions>
+void g2() {
+  g2<Actions...>();
+}
+
+int main()
+{
+  g2<A1>();
+}