1// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2// { dg-options "-fexceptions" }
3
4int fail = 0;
5
6struct A {
7   A () { a = 'a'; b = 'b'; c = 'c'; }
8   ~ A () {
9      if ( a != 'a' ) fail = 1;
10      if ( b != 'b' ) fail = 1;
11      if ( c != 'c' ) fail = 1;
12   }
13   char a, b, c;
14};
15
16void some_init () { throw 1; }
17
18struct C : A {
19   C () { some_init (); }
20};
21
22int main () {
23  try {
24    C c;
25  } catch (int i) {
26    return 0;
27  }
28  return 1;
29}
30