]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add original testcase [PR67898]
authorPatrick Palka <ppalka@redhat.com>
Tue, 30 Jan 2024 17:30:32 +0000 (12:30 -0500)
committerPatrick Palka <ppalka@redhat.com>
Tue, 30 Jan 2024 17:30:32 +0000 (12:30 -0500)
The original testcase from this PR (fixed by r14-8291) seems rather
different from the others, so let's add it to the testsuite.

PR c++/67898

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/temp_default8.C: New test.

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

diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default8.C b/gcc/testsuite/g++.dg/cpp0x/temp_default8.C
new file mode 100644 (file)
index 0000000..505c67d
--- /dev/null
@@ -0,0 +1,14 @@
+// PR c++/67898
+// { dg-do compile { target c++11 } }
+
+void f(int);
+void f(float);
+
+template<class T, T F, T G, bool b = F == G> struct X { };
+
+template<class T>
+void test() {
+  X<void(T), f, f>();
+}
+
+template void test<int>();