OSDN Git Service

update
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.mike / dyncast1.C
1 // Special g++ Options: -fexceptions -w
2 // excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe
3
4 #include <typeinfo>
5
6 struct B {
7   virtual f() { }
8 };
9
10 struct D {
11   virtual f() { }
12 };
13
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;
22 }