1// Copyright (C) 2004 Free Software Foundation, Inc.
2// Contributed by Nathan Sidwell 1 Apr 2004 <nathan@codesourcery.com>
3
4// PR c++/3518
5template <typename T> void Foo (const T &);
6template <typename T> void Baz (const T (*)()); // { dg-message "note" }
7
8int &f ();
9
10int main()
11{
12  Foo (f);
13  Baz (f); // { dg-error "no matching function" "" }
14  // { dg-message "(candidate|incompatible cv-qualifiers)" "candidate note" { target *-*-* } 13 }
15}
16