2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / overload / virtual1.C
blob8940aefd05356beb301c13261419829b22849427
1 // Test that explicit scope suprresses virtual lookup even after an
2 // explicit object.
4 extern "C" int printf (const char *, ...);
6 struct A
8   virtual int f () { return 0; }
9 };
11 struct B: public A
13   int f () { return 1; }
14   int g() { return this->A::f(); }
17 int main()
19   B b;
20   return b.g();