aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c3
-rw-r--r--gcc/testsuite/ChangeLog2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic110.C15
4 files changed, 23 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7493fd2..204fea6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2011-05-25 Jason Merrill <jason@redhat.com>
+ PR c++/45698
+ * pt.c (dependent_template_arg_p): See through ARGUMENT_PACK_SELECT.
+
PR c++/46145
* decl.c (grokdeclarator): Complain about auto typedef.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index c3c759e..c9c25cd2 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -18759,6 +18759,9 @@ dependent_template_arg_p (tree arg)
if (arg == error_mark_node)
return true;
+ if (TREE_CODE (arg) == ARGUMENT_PACK_SELECT)
+ arg = ARGUMENT_PACK_SELECT_ARG (arg);
+
if (TREE_CODE (arg) == TEMPLATE_DECL
|| TREE_CODE (arg) == TEMPLATE_TEMPLATE_PARM)
return dependent_template_p (arg);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7e88ecc..2a30f6e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,7 @@
2011-05-25 Jason Merrill <jason@redhat.com>
+ * g++.dg/cpp0x/variadic110.C: New.
+
* g++.dg/cpp0x/auto9.C: Add typedef test.
* g++.dg/cpp0x/auto23.C: New.
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic110.C b/gcc/testsuite/g++.dg/cpp0x/variadic110.C
new file mode 100644
index 0000000..86f1bb1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic110.C
@@ -0,0 +1,15 @@
+// PR c++/45698
+// { dg-options -std=c++0x }
+
+template <class... Ts> struct tuple { };
+
+template<class... Ts>
+struct A {
+ template<typename T> struct N { };
+ tuple<N<Ts>...> tup;
+};
+
+int main()
+{
+ A<int, double> a;
+}