FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / eh44.C
blobbb409e9b4ee3a372c1f2278968d8dbbf9370a367
1 // Special g++ Options: -fexceptions
2 // excess errors test - XFAIL sparc64-*-elf arm-*-pe
3 // prms-id: 9159
5 static unsigned int iCounter = 0;
6 static unsigned int iMax;
7 int fail = 0;
9 class ca {
10 public:
11   ca(int) {
12     if (iCounter++ == iMax)
13       throw (const char*)"iCounter";
14   }
15   virtual ~ca() {
16   }
19 class cc {
20 public:
21   cc(const ca &rca1, const ca &rca2) {
22   }
23   virtual ~cc() {
24     fail = 1;
25   }
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;