aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/explicit7.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/template/explicit7.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/template/explicit7.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/template/explicit7.C b/gcc-4.9/gcc/testsuite/g++.dg/template/explicit7.C
new file mode 100644
index 000000000..742467718
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/template/explicit7.C
@@ -0,0 +1,13 @@
+// PR c++/22263
+// { dg-do link }
+
+template <class T> struct S { T foo (); T bar (); };
+template <class T> T S<T>::foo () { return bar (); }
+template struct S<int>;
+template <class T> T S<T>::bar () { return T (); }
+
+#if !__GXX_WEAK__
+template int S<int>::bar ();
+#endif
+
+int main () { return S<int>().foo (); }