aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p6610a.C
blob: b0b13d47f971c5df4d52f3473f81ad0d01890a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// prms-id: 6610

int fail = 1;
struct B;
struct A { virtual int f(const B*) = 0; int g(const B*); };
int A::g(const B* t) { return f(t); }
struct B : virtual A { B(); int f(const B*); B* B_this; };
B::B() { if (g(this)) fail = 0; }
int B::f(const B* t) { return t == this; }
struct C : B { int f(const B*); int x; };
int C::f(const B*) { return 0; }

int main() { C c; return fail; }