Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.mike / eh17.C
blob2443d568024bc1bfdcacf8bdde446eb62024918f
1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2 // { dg-options "-fexceptions" }
4 int e = 1;
6 struct A {
7   ~A() {
8     --e;
9   }
12 struct B : public A {
13   B() {
14     throw 1;
15   }
18 int
19 main() {
20   try {
21     B b;
22   } catch (...) {
23     return e;
24   }
25   return 1;