[Bug c++/102013] Incorrect aggregate initialization of union

2021-08-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102013 --- Comment #2 from Andrew Pinski --- This is interesting: struct A { int x = 6; }; struct B { int x = 3; }; union U { A a; B b; }; static_assert (U{}.a.x==6); U a{}; int main() { if (a.a.x != 6) __builtin_abort(); } The stati

[Bug c++/102013] Incorrect aggregate initialization of union

2021-08-23 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102013 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|