diff mbox series

C++ PATCH to add test for c++/71548

Message ID 20190618205447.GA5989@redhat.com
State New
Headers show
Series C++ PATCH to add test for c++/71548 | expand

Commit Message

Marek Polacek June 18, 2019, 8:54 p.m. UTC
Invalid, but we used to crash here, so let's make sure the ICE doesn't
creep back in.

Tested on x86_64-linux, applying to trunk.

2019-06-18  Marek Polacek  <polacek@redhat.com>

	PR c++/71548
	* g++.dg/cpp0x/variadic177.C: New test.
diff mbox series

Patch

diff --git gcc/testsuite/g++.dg/cpp0x/variadic177.C gcc/testsuite/g++.dg/cpp0x/variadic177.C
new file mode 100644
index 00000000000..96736a0ac0a
--- /dev/null
+++ gcc/testsuite/g++.dg/cpp0x/variadic177.C
@@ -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" }
+}