1// { dg-do compile }
2
3// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
4
5// PR c++/11616: Incorrect line number in diagnostics
6
7template <int> struct A
8{
9  static const int i=0;
10};
11
12int baz() { return A<0>::i; }
13
14struct B
15{
16  static void foo (int);	// { dg-message "B::foo|candidate expects" }
17};
18
19template <typename T> struct C
20{
21  virtual void bar() const { T::foo(); } // { dg-error "no matching function" }
22};
23
24C<B> c;				// { dg-message "required" }
25