* g++.old-deja/g++.pt/unify7.C: New test.
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Feb 2000 10:30:56 +0000 (10:30 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 29 Feb 2000 10:30:56 +0000 (10:30 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32254 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.pt/unify7.C [new file with mode: 0644]

index 3f69198..10a4b14 100644 (file)
@@ -1,3 +1,7 @@
+2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * g++.old-deja/g++.pt/unify7.C: New test.
+
 Sat Feb 26 19:46:09 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * g++.old-deja/g++.ext/attrib5.C: XFAIL on Alpha since no link alias.
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 (file)
index 0000000..6afb823
--- /dev/null
@@ -0,0 +1,15 @@
+// Build don't link:
+
+// 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 ();    // gets bogus error
+
+void g ()
+{
+  int (*pfn1) () = &foo;    // gets bogus error
+  void (*pfn2) () = &foo;   // gets bogus error
+}