[C++ PATCH]: instantiation via vtable marking
[official-gcc.git] / gcc / testsuite / g++.dg / template / instantiate5.C
blobd64092eb1a80c6c7509c26afb7033435852a8968
1 // { dg-do compile }
3 // Origin: Volker Reichelt <reichelt@gcc.gnu.org>
5 // PR c++/11616: Incorrect line number in diagnostics
7 template <int> struct A
9   static const int i=0;
12 int baz() { return A<0>::i; }
14 struct B
16   static void foo (int);        // { dg-message "B::foo|candidate expects" }
19 template <typename T> struct C
21   virtual void bar() const      // { dg-message "required" }
22   {
23     T::foo(); // { dg-error "no matching function" }
24   }
27 C<B> c;
29 int k;