c++: Add testcase for already fixed PR [PR77435]
authorPatrick Palka <ppalka@redhat.com>
Thu, 22 Apr 2021 21:47:00 +0000 (17:47 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 22 Apr 2021 21:47:00 +0000 (17:47 -0400)
We correctly accept this testcase since r8-1437.

gcc/testsuite/ChangeLog:

PR c++/77435
* g++.dg/template/partial-specialization9.C: New test.

gcc/testsuite/g++.dg/template/partial-specialization9.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/template/partial-specialization9.C b/gcc/testsuite/g++.dg/template/partial-specialization9.C
new file mode 100644 (file)
index 0000000..49f3500
--- /dev/null
@@ -0,0 +1,7 @@
+// PR c++/77435
+
+template<int, class T, T> struct S;
+template<class T, T A> struct S<0, T, A> {};
+int i;
+S<0, int*, &i> r;  // OK
+S<0, int&, i> s;   // error: aggregate 'S<0, int&, i> s' has incomplete type