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

#include <typeinfo>

class B {
public:
  int data;
  B(int i) : data(i) {
  }
} b(42);

main() {
  try {
    throw &b;
  } catch (B* b) {
    if (b->data == 42)
      return 0;
  }
  return 1;
}