Home | History | Annotate | Download | only in jni
      1 // { dg-do "run" }
      2 // { dg-options "-std=gnu++0x" }
      3 struct A {};
      4 struct B {};
      5 struct C {};
      6 
      7 template<typename... Exceptions> void f(int idx) throw(Exceptions...) {
      8   if (idx == 0) throw A();
      9   else if (idx == 1) throw B();
     10   else if (idx == 2) throw C();
     11 }
     12 
     13 extern "C" void abort();
     14 
     15 int main()
     16 {
     17   try {
     18     f<A, B, C>(0);
     19     abort();
     20   } catch (A) {
     21   }
     22   try {
     23     f<A, B, C>(1);
     24     abort();
     25   } catch (B) {
     26   }
     27   try {
     28     f<A, B, C>(2);
     29     abort();
     30   } catch (C) {
     31   }
     32   return 0;
     33 }
     34