Home | History | Annotate | Download | only in jni
      1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
      2 // { dg-options "-fexceptions" }
      3 // prms-id: 9159
      4 
      5 static unsigned int iCounter = 0;
      6 static unsigned int iMax;
      7 int fail = 0;
      8 
      9 class ca {
     10 public:
     11   ca(int) {
     12     if (iCounter++ == iMax)
     13       throw (const char*)"iCounter";
     14   }
     15   virtual ~ca() {
     16   }
     17 };
     18 
     19 class cc {
     20 public:
     21   cc(const ca &rca1, const ca &rca2) {
     22   }
     23   virtual ~cc() {
     24     fail = 1;
     25   }
     26 };
     27 
     28 
     29 int main(int argc, char **argv) {
     30   iMax = 1;
     31   try {
     32     cc sc(ca(1), ca(1));
     33   } catch (const char *pMsg) {
     34   }
     35   return fail;
     36 }
     37