1// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2// { dg-options "-fexceptions" }
3
4int fail = 1;
5class B {
6public:
7  B() { throw 1; }
8};
9class D : public B {
10public:
11  D();
12};
13
14D::D() try : B() {
15  fail = 1;
16} catch (...) {
17  fail = 0;
18  throw;
19}
20
21int main() {
22  try {
23    D d;
24    fail = 1;
25  } catch (...) {
26  }
27  return fail;
28}
29