// { dg-do compile } struct A { virtual ~A() { }; }; struct B : A { }; void f(B* bp) { bp = #ifdef __GXX_RTTI dynamic_cast(static_cast(0)); #endif }