blob: 40ef080a297c93027a5f27431c7fa4bf35b753c4 [file] [log] [blame]
// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
// { dg-options "-fexceptions" }
int count;
class Foo {
public:
Foo() { ++count; }
Foo(const Foo&) { ++count; }
~Foo() { --count; }
};
int main() {
try {
throw Foo();
}
catch (Foo& object) {
if (count == 1)
return 0;
}
return 1;
}