diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.mike/eh29.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.mike/eh29.C | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/eh29.C b/gcc/testsuite/g++.old-deja/g++.mike/eh29.C new file mode 100644 index 00000000000..58c1f0b3f82 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.mike/eh29.C @@ -0,0 +1,27 @@ +// Special g++ Options: -fexceptions +// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-* + +int count; + +class A { +public: + A() { +// printf("ctor %x\n", (int)this); + if (count==3) + throw 1; + ++count; + } + ~A() { + --count; +// printf("dtor %x\n", (int)this); + } +}; + +main() { + try { + A a[5]; + } catch (...) { + return count; + } + return 1; +} |