re PR c++/71548 (Invalid declaration involving template template param causes crash)
authorMarek Polacek <polacek@redhat.com>
Tue, 18 Jun 2019 20:55:46 +0000 (20:55 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 18 Jun 2019 20:55:46 +0000 (20:55 +0000)
PR c++/71548
* g++.dg/cpp0x/variadic177.C: New test.

From-SVN: r272438

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/variadic177.C [new file with mode: 0644]

index cbbaacdeac62002940a8c6ad06942e09ec64ea96..a348251a9309209cd20d9c16c54064c5baa56453 100644 (file)
@@ -1,3 +1,8 @@
+2019-06-18  Marek Polacek  <polacek@redhat.com>
+
+       PR c++/71548
+       * g++.dg/cpp0x/variadic177.C: New test.
+
 2019-06-18  Richard Sandiford  <richard.sandiford@arm.com>
 
        * gcc.target/aarch64/sve/struct_vect_18.c: Allow branches to
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic177.C b/gcc/testsuite/g++.dg/cpp0x/variadic177.C
new file mode 100644 (file)
index 0000000..96736a0
--- /dev/null
@@ -0,0 +1,12 @@
+// PR c++/71548
+// { dg-do compile { target c++11 } }
+
+template<typename> class fl {};
+template<typename = void, template<class...> class = fl>
+struct S {};
+template<typename... T>
+void f(S<T...> ) {}
+void lol() {
+    S<> s;
+    f(s); // { dg-error "no matching function for call to" }
+}