1 // I think this dynamic_cast has undefined behavior when destroying E::o
2 // because we're the F period of destruction has started and ap doesn't
3 // point to the object currently being destroyed--but the reasonable
4 // options are success or failure, not SEGV.
8 extern "C" void abort();
10 struct A { virtual ~A(); };
11 struct B { virtual ~B() { } };
13 struct E : virtual B { A o; };
14 struct F : virtual C, virtual E { };
20 C* cp2 = dynamic_cast<C*>(ap);
21 if (cp2 != cp && cp2 != 0)