summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/unify7.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/unify7.C')
-rw-r--r--gcc/testsuite/g++.dg/template/unify7.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/unify7.C b/gcc/testsuite/g++.dg/template/unify7.C
new file mode 100644
index 000000000..2bfa56303
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/unify7.C
@@ -0,0 +1,15 @@
+// Copyright (C) 2004 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 1 Apr 2004 <nathan@codesourcery.com>
+
+// PR c++/3518
+template <typename T> void Foo (const T &);
+template <typename T> void Baz (const T (*)()); // { dg-message "note" }
+
+int &f ();
+
+int main()
+{
+ Foo (f);
+ Baz (f); // { dg-error "no matching function" "" }
+ // { dg-message "candidate" "candidate note" { target *-*-* } 13 }
+}