summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/eh47.C
blob: 10eb8a8970f6428355c78caddc7c2a1693cc0c72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do run { xfail sparc64-*-elf arm-*-pe } }
// { dg-options "-fexceptions" }

#include <cstdlib>
#include <exception>

void myterm() {
  exit (0);
}

main() {
  try {
    throw "";
  } catch (...) {
  }
  try {
    std::set_terminate (myterm);
    throw;
  } catch (...) {
    return 1;
  }
  return 1;
}