2 // { dg-options "-frtti" }
3 // test of rtti of single inheritance and multiple inheritance with
9 int printf(const char *, ...);
16 virtual int f() {return 0;};
36 virtual int a() {return 0;};
42 virtual int g() {return 0;};
45 class D : public A, public B {
50 class E : public D, public B {
58 class F : public E, public D {
79 if (typeid(z) != typeid(Z)) error(1);
80 if (typeid(*yp) != typeid(Z)) error(2);
81 if (typeid(*yp) != typeid(*zp)) error(3);
82 if (typeid(xp) == typeid(yp)) error(4);
85 if (typeid(*xp) == typeid(*yp)) error(5);
86 if (typeid(*xp) != typeid(Y)) error(6);
88 if (typeid(*ap) != typeid(*bp)) error (31);
89 if (typeid(*ap) != typeid(D)) error(32);
91 vp = dynamic_cast<void*> ((B *)vp);
92 if (dp != (D *)vp) error(35);
95 if (typeid(*aap) != typeid(*bbp)) error(37);
96 if (typeid(*dp) != typeid(*aap)) error(38);