1 // Copyright (C) 2001 Free Software Foundation, Inc.
2 // Contributed by Nathan Sidwell 9 Jun 2001 <nathan@codesourcery.com>
4 // Bug 3089. We ICE'd in construction vtables.
18 virtual void check (void *whole, void *base);
30 void A::check (void *whole, void *base)
32 if (dynamic_cast <void *> (this) != whole)
34 else if (this != base)
42 virtual void check (void *whole, void *base);
53 void B::check (void *whole, void *base)
55 if (dynamic_cast <void *> (this) != whole)
57 else if (this != base)
61 struct C : virtual public B, virtual public A
65 virtual void check (void *whole, void *base);
75 void C::check (void *whole, void *base)
77 if (dynamic_cast <void *> (this) != whole)
79 else if (this != base)
81 A::check (whole, static_cast <A *> (this));
82 B::check (whole, static_cast <B *> (this));
85 struct D : virtual public A
89 virtual void check (void *whole, void *base);
99 void D::check (void *whole, void *base)
101 if (dynamic_cast <void *> (this) != whole)
103 else if (this != base)
105 A::check (whole, static_cast <A *> (this));
108 struct E : virtual public C, virtual public D
112 virtual void check (void *whole, void *base);
122 void E::check (void *whole, void *base)
124 if (dynamic_cast <void *> (this) != whole)
126 else if (this != base)
128 C::check (whole, static_cast <C *> (this));
129 D::check (whole, static_cast <D *> (this));
132 struct F : virtual public E
136 virtual void check (void *whole, void *base);
146 void F::check (void *whole, void *base)
148 if (dynamic_cast <void *> (this) != whole)
150 else if (this != base)
152 E::check (whole, static_cast <F *> (this));