2 // { dg-options "-frtti -w" }
3 // test of rtti of single inheritance and multiple inheritance with
9 int printf(const char *, ...);
19 class Y : public virtual X {
23 class Z : public virtual Y {
45 class D : public virtual A, private B {
49 class E : public virtual D, public B {
53 class F : public E, public virtual D {
74 if (typeid(z) != typeid(Z)) error(1);
75 if (typeid(*yp) != typeid(Z)) error(2);
76 if (typeid(*yp) != typeid(*zp)) error(3);
77 if (typeid(xp) == typeid(yp)) error(4);
80 if (typeid(*xp) == typeid(*yp)) error(5);
81 if (typeid(*xp) != typeid(Y)) error(6);
83 if (typeid(*ap) != typeid(*bp)) error (31);
84 if (typeid(*ap) != typeid(D)) error(32);
85 if (typeid(*aap) != typeid(*bbp)) error(33);
86 if (typeid(*dp) != typeid(*aap)) error(34);