comparison gcc/testsuite/g++.old-deja/g++.mike/eh17.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 // { dg-do run { xfail sparc64-*-elf arm-*-pe } }
2 // { dg-options "-fexceptions" }
3
4 int e = 1;
5
6 struct A {
7 ~A() {
8 --e;
9 }
10 };
11
12 struct B : public A {
13 B() {
14 throw 1;
15 }
16 };
17
18 main() {
19 try {
20 B b;
21 } catch (...) {
22 return e;
23 }
24 return 1;
25 }