FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / net21.C
blob02e40b0b935d83f600976d0dd0cd994d3c3b2a83
1 // Make sure we can initialize complex (MI ambiguous) vtables.
3 extern "C" int printf(const char *, ...);
5 struct a
7     virtual void f() = 0;
8 };
10 struct b
12     virtual void g() { };
15 struct c: public a, public b
17     virtual void f();
18     virtual void g();
21 void c::f()
23     printf("c::f()\n");
26 void c::g()
28     printf("c::g()\n");
31 struct e: public b
35 struct h
39 struct d: public c, public e, public h
41     virtual void f();
42     virtual void g();
44 void d::f()
46     printf("d::f()\n");
49 void d::g()
51     printf("d::g()\n");
54 int main(int argc, char* argv[])
56     a* tmp = new d;
57     tmp->f();
58     return 0;