[gcc r14-6422] c++: add fixed testcase [PR63378]

Patrick Palka ppalka@gcc.gnu.org
Mon Dec 11 16:59:44 GMT 2023


https://gcc.gnu.org/g:475b7f44c640c03f968d66dae389ea6165b4b5c2

commit r14-6422-g475b7f44c640c03f968d66dae389ea6165b4b5c2
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Dec 11 11:59:33 2023 -0500

    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.

Diff:
---
 gcc/testsuite/g++.dg/template/fnspec3.C | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gcc/testsuite/g++.dg/template/fnspec3.C b/gcc/testsuite/g++.dg/template/fnspec3.C
new file mode 100644
index 00000000000..c36cb17751d
--- /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>;


More information about the Gcc-cvs mailing list