Home | History | Annotate | Download | only in jni
      1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
      2 // { dg-options "-fexceptions -w" }
      3 
      4 #include <typeinfo>
      5 
      6 struct B {
      7   virtual int f() { }
      8 };
      9 
     10 struct D {
     11   virtual int f() { }
     12 };
     13 
     14 int 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 }
     23