aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2023-12-11 11:59:33 -0500
committerPatrick Palka <ppalka@redhat.com>2023-12-11 11:59:33 -0500
commit475b7f44c640c03f968d66dae389ea6165b4b5c2 (patch)
tree22c7657f8cf37737eb13816caae286777b127af9
parent35ade856eaafd9c39ce864b25d127e1f98a3bb57 (diff)
downloadgcc-475b7f44c640c03f968d66dae389ea6165b4b5c2.zip
gcc-475b7f44c640c03f968d66dae389ea6165b4b5c2.tar.gz
gcc-475b7f44c640c03f968d66dae389ea6165b4b5c2.tar.bz2
c++: add fixed testcase [PR63378]
We accept this testcase since r12-4453-g79802c5dcc043a. PR c++/63378 gcc/testsuite/ChangeLog: * g++.dg/template/fnspec3.C: New test.
-rw-r--r--gcc/testsuite/g++.dg/template/fnspec3.C20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/fnspec3.C b/gcc/testsuite/g++.dg/template/fnspec3.C
new file mode 100644
index 0000000..c36cb17
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/fnspec3.C
@@ -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>;