1 // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2 // { dg-do compile { target c++20 } }
6 constexpr S() = default;
13 constexpr U() = default;
20 constexpr S2() = default;
23 constexpr S2 s2; // { dg-error "uninitialized .const s2." }
27 constexpr U2() = default;
30 constexpr U2 u2; // { dg-error "uninitialized .const u2." }
33 // FIXME if it's anonymous union, we don't give the error below
37 constexpr S3() = default;
40 constexpr S3 s3; // { dg-error "uninitialized .const s3." }
43 // FIXME if it's anonymous union, we don't give the error below
47 constexpr S4() = default;
50 constexpr S4 s4; // { dg-error "uninitialized .const s4." }
56 // FIXME if it's anonymous union, we don't give the error below
60 constexpr S5() = default;
63 constexpr S5 s5; // { dg-error "uninitialized .const s5.|not a constant expression" }