2 // Copyright (C) 2001 Free Software Foundation, Inc.
3 // Contributed by Nathan Sidwell 9 Jun 2001 <nathan@codesourcery.com>
5 // Bug 3089. We ICE'd in construction vtables.
19 virtual void check (void *whole, void *base);
31 void A::check (void *whole, void *base)
33 if (dynamic_cast <void *> (this) != whole)
35 else if (this != base)
43 virtual void check (void *whole, void *base);
54 void B::check (void *whole, void *base)
56 if (dynamic_cast <void *> (this) != whole)
58 else if (this != base)
62 struct C : virtual public B, virtual public A
66 virtual void check (void *whole, void *base);
76 void C::check (void *whole, void *base)
78 if (dynamic_cast <void *> (this) != whole)
80 else if (this != base)
82 A::check (whole, static_cast <A *> (this));
83 B::check (whole, static_cast <B *> (this));
86 struct D : virtual public A
90 virtual void check (void *whole, void *base);
100 void D::check (void *whole, void *base)
102 if (dynamic_cast <void *> (this) != whole)
104 else if (this != base)
106 A::check (whole, static_cast <A *> (this));
109 struct E : virtual public C, virtual public D
113 virtual void check (void *whole, void *base);
123 void E::check (void *whole, void *base)
125 if (dynamic_cast <void *> (this) != whole)
127 else if (this != base)
129 C::check (whole, static_cast <C *> (this));
130 D::check (whole, static_cast <D *> (this));
133 struct F : virtual public E
137 virtual void check (void *whole, void *base);
147 void F::check (void *whole, void *base)
149 if (dynamic_cast <void *> (this) != whole)
151 else if (this != base)
153 E::check (whole, static_cast <F *> (this));