OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.mike / p6610a.C
1 // prms-id: 6610
2
3 int fail = 1;
4 struct B;
5 struct A { virtual int f(const B*) = 0; int g(const B*); };
6 int A::g(const B* t) { return f(t); }
7 struct B : virtual A { B(); int f(const B*); B* B_this; };
8 B::B() { if (g(this)) fail = 0; }
9 int B::f(const B* t) { return t == this; }
10 struct C : B { int f(const B*); int x; };
11 int C::f(const B*) { return 0; }
12
13 int main() { C c; return fail; }