OSDN Git Service

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