summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/link1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/link1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/link1.C29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/link1.C b/gcc/testsuite/g++.old-deja/g++.pt/link1.C
new file mode 100644
index 000000000..4e31c28bd
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/link1.C
@@ -0,0 +1,29 @@
+// { dg-do link }
+// Origin: Mark Mitchell <mark@codesourcery.com>
+
+template <class T>
+int f(T);
+
+template <class T>
+struct S {
+ template <class U>
+ friend int f(U) { return 0; }
+};
+
+int k = f(2);
+
+template <class T>
+int g(T);
+
+int h = g(7);
+
+template <class T>
+int g(T) {
+ S<T> si;
+ return 0;
+}
+
+int main()
+{
+}
+