aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/eh16.C
blob: 2a986d5446631eb00faf5cffc3a5a650474875fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Special g++ Options: -fexceptions
// excess errors test - XFAIL a29k-*-* sparc64-*-elf sh-*-* arm-*-pe**-*

int err = 1;

struct A {
  ~A() {
    --err;
  }
};

struct B {
  A a;
  B() {
    throw 1;
  }
};

main() {
  try {
    B b;
  } catch (...) {
    return err;
  }
  return 1;
}