comparison gcc/testsuite/g++.dg/cpp0x/initlist-throw2.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 // PR c++/85363
2 // { dg-do run { target c++11 } }
3
4 int
5 init (int f)
6 {
7 throw f;
8 }
9
10 struct X {
11 X () : n {init (42)} {}
12 int n;
13 };
14
15 struct P {
16 struct R {
17 struct Q {
18 X x = {};
19 } q;
20 } r;
21 };
22
23 int
24 main ()
25 {
26 try {
27 P p {};
28 }
29 catch (int n) {
30 return 0;
31 }
32 return 1;
33 }