2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / initlist-throw1.C
blob264c6c7a7a0100ca3d8c46f0c140c4b9107e74cf
1 // PR c++/85363
2 // { dg-do run { target c++11 } }
4 int
5 init (int f)
7   throw f;
10 struct X {
11   X (int f) : n {init (f)} {}
12   int n;
15 struct P {
16   X x{20};
19 int
20 main ()
22   try {
23     P p {};
24   }
25   catch (int n) {
26     return 0;
27   }
28   return 1;