1// Special g++ Options: -fexceptions 2// excess errors test - XFAIL a29k-*-* sparc64-*-elf arm-*-pe 3// prms-id: 7912 4 5int count = 0; 6 7class Foo { 8public: 9 Foo() { ++count; }; 10 Foo(const Foo&) { ++count; }; 11 ~Foo() { --count; }; 12}; 13 14 15main() 16{ 17 try { 18 throw Foo(); 19 } 20 catch (Foo object) { 21 } 22 return count; 23} 24