Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / g++.old-deja / g++.mike / dyncast1.C
blob8764acddec05b561c603028991aeec6b0f3fc150
1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2 // { dg-options "-fexceptions -w" }
4 #include <typeinfo>
6 struct B {
7   virtual int f() { }
8 };
10 struct D {
11   virtual int f() { }
14 main() {
15   B b;
16   try {
17     (void)dynamic_cast<D&>(b);
18   } catch (std::bad_cast) {
19     return 0;
20   }
21   return 1;