1 // test of rtti of single inheritance and multiple inheritance with
3 // Special g++ Options: -frtti -w
8 int printf(const char *, ...);
18 class Y : public virtual X {
22 class Z : public virtual Y {
44 class D : public virtual A, private B {
48 class E : public virtual D, public B {
52 class F : public E, public virtual D {
73 if (typeid(z) != typeid(Z)) error(1);
74 if (typeid(*yp) != typeid(Z)) error(2);
75 if (typeid(*yp) != typeid(*zp)) error(3);
76 if (typeid(xp) == typeid(yp)) error(4);
79 if (typeid(*xp) == typeid(*yp)) error(5);
80 if (typeid(*xp) != typeid(Y)) error(6);
82 if (typeid(*ap) != typeid(*bp)) error (31);
83 if (typeid(*ap) != typeid(D)) error(32);
84 if (typeid(*aap) != typeid(*bbp)) error(33);
85 if (typeid(*dp) != typeid(*aap)) error(34);