Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.mike/p7912.C

raw
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
16 main()
17 {
18 try {
19 throw Foo();
20 }
21 catch (Foo object) {
22 }
23 return count;
24 }