gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C
raw| 1 | // PR c++/93803 - ICE with constexpr init and [[no_unique_address]]. |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | struct empty { }; |
| 5 | |
| 6 | struct foo { |
| 7 | [[no_unique_address]] empty x, x2, x3; |
| 8 | constexpr foo() : x{}, x2{} { } |
| 9 | }; |
| 10 | |
| 11 | struct bar : foo { |
| 12 | using foo::foo; |
| 13 | }; |
| 14 | |
| 15 | constexpr bar a{}; |