https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102286
--- Comment #1 from Luke Dalessandro <ldalessandro at gmail dot com> ---
Oops, slightly reduced testcase, don't think the struct is necessary (just part
of my RL code).
union U {
int data[1];
constexpr U() {} // no active member
};
constexpr bool bar() {
U u;
std::construct_at(&u.data[0], 0); // (1)
return true;
}
Per https://eel.is/c++draft/class.union#general-6, only assignment can start
the data array lifetime at (1). https://godbolt.org/z/6vfY6fT3d