]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add fixed testcase [PR63378]
authorPatrick Palka <ppalka@redhat.com>
Mon, 11 Dec 2023 16:59:33 +0000 (11:59 -0500)
committerPatrick Palka <ppalka@redhat.com>
Mon, 11 Dec 2023 16:59:33 +0000 (11:59 -0500)
We accept this testcase since r12-4453-g79802c5dcc043a.

PR c++/63378

gcc/testsuite/ChangeLog:

* g++.dg/template/fnspec3.C: New test.

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

diff --git a/gcc/testsuite/g++.dg/template/fnspec3.C b/gcc/testsuite/g++.dg/template/fnspec3.C
new file mode 100644 (file)
index 0000000..c36cb17
--- /dev/null
@@ -0,0 +1,20 @@
+// PR c++/63378
+// { dg-do compile { target c++11 } }
+
+template<class T1, class S1>
+struct B { };
+
+template<class T1>
+struct A {
+private:
+  template<class T2, class S2>
+  static B<T2, S2> g();
+
+public:
+  template<class S2>
+  auto f() -> decltype(g<T1, S2>());
+};
+
+template<>
+template<>
+auto A<int>::f<float>() -> B<int, float>;