gcc/testsuite/g++.dg/torture/pr11911.C
raw| 1 | // { dg-do compile } |
| 2 | // { dg-require-effective-target c++17 } |
| 3 | |
| 4 | struct b { |
| 5 | int a; |
| 6 | }; |
| 7 | struct c { |
| 8 | b d{}; |
| 9 | c() = default; |
| 10 | c(c &) = delete; |
| 11 | }; |
| 12 | struct e { |
| 13 | c a{}; |
| 14 | e() {} |
| 15 | }; |
| 16 | inline e f() { return {}; } |
| 17 | struct g { |
| 18 | e cx; |
| 19 | g() : cx{f()} {} |
| 20 | }; |
| 21 | void h() { g i; } |