2 // { dg-options "-frtti" }
3 // test of rtti of single inheritance and multiple inheritance with
10 int printf(const char *, ...);
17 virtual int f() {return 0;};
37 virtual int a() {return 0;};
43 virtual int g() {return 0;};
46 class D : public A, public B {
51 class E : public D, public B {
59 class F : public E, public D {
91 vp = dynamic_cast<Y *> (&z);
92 if (vp == 0) error(11);
94 vp = dynamic_cast<Z *> (yp);
95 if (vp == 0) error(11);
97 vp = dynamic_cast<X *> (yp);
98 if (vp == 0) error(12);
100 vp = dynamic_cast<D *> (dp);
101 if (vp != (void *)dp) error(21);
103 vp = dynamic_cast<B *> (dp);
104 if (vp == (void *)dp) error(21);
106 vp = dynamic_cast<B *> (fp);
107 if (vp != (void *)bbp) error(22);
109 vp = dynamic_cast<void *> (aap);
110 if (vp != (void *)fp) error(23);
112 vp = dynamic_cast<B *> (aap);
113 if (vp != (void *)bbp) error(24);