summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/unify7.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/unify7.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/unify7.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/unify7.C b/gcc/testsuite/g++.old-deja/g++.pt/unify7.C
new file mode 100644
index 000000000..fb7e6b026
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/unify7.C
@@ -0,0 +1,15 @@
+// { dg-do assemble }
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 26 Feb 2000 <nathan@codesourcery.com>
+
+// template functions can be distinguished by return type alone. The return
+// type may also be a template parameter.
+
+template <typename C> C foo (); // { dg-bogus "" }
+
+void g ()
+{
+ int (*pfn1) () = &foo; // { dg-bogus "" }
+ void (*pfn2) () = &foo; // { dg-bogus "" }
+}