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: ca(int)11 ca(int) { 12 if (iCounter++ == iMax) 13 throw (const char*)"iCounter"; 14 } ~ca()15 virtual ~ca() { 16 } 17 }; 18 19 class cc { 20 public: cc(const ca & rca1,const ca & rca2)21 cc(const ca &rca1, const ca &rca2) { 22 } ~cc()23 virtual ~cc() { 24 fail = 1; 25 } 26 }; 27 28 main(int argc,char ** argv)29int 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