Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/initlist-throw2.C

raw
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 }