Merged r158704 through r158906 into branch.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / dyncast8.C
blobe2c5a2df9a60de75abd8cd5568c24297d23dccf6
1 // { dg-do run  }
2 #include <typeinfo>
4 class Base
6 public:
7   virtual ~Base() { }
8 };
10 class Derived : public Base
12 public:
13     Derived() {}
16 int main()
18     const Derived b;
19     const Base*   ap = &b;
21     const Derived* p1 = dynamic_cast<const Derived*>(ap);
22     return p1 == 0;