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