Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.mike/eh40.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } } |
2 // { dg-options "-fexceptions" } | |
3 | |
4 int fail = 1; | |
5 class B { | |
6 public: | |
7 B() { throw 1; } | |
8 }; | |
9 class D : public B { | |
10 public: | |
11 D() try : B() { | |
12 fail = 1; | |
13 } catch (char c) { | |
14 fail = 1; | |
15 throw; | |
16 } catch (...) { | |
17 fail = 0; | |
18 throw; | |
19 } | |
20 }; | |
21 | |
131 | 22 int |
111 | 23 main() { |
24 try { | |
25 D d; | |
26 fail = 1; | |
27 } catch (...) { | |
28 } | |
29 return fail; | |
30 } |