summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/rtti/predefined-rtti-macro-1.C
blob: 5c94bc1de177d56aed3ff3c0201b59fa907d6f2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-do compile }

struct A { virtual ~A() { }; };
struct B : A { };

void f(B* bp)
{
  bp =
#ifdef __GXX_RTTI
  dynamic_cast<B*>(static_cast<A*>(0));
#endif
}