summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/friend32.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/friend32.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/friend32.C16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/friend32.C b/gcc/testsuite/g++.old-deja/g++.pt/friend32.C
new file mode 100644
index 000000000..512a69a09
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/friend32.C
@@ -0,0 +1,16 @@
+// { dg-do assemble }
+
+template <class T, class U>
+struct S {
+ template <class X, class Y, class Z>
+ friend X f(X, Y, Z);
+};
+
+template class S<int, double>;
+template char f(char, long, short);
+template char* f(char*, long*, short*);
+
+template <class X, class Y, class Z>
+X f(X x, Y, Z) {
+ return x;
+}