https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117475
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |---
Ever confirmed|1 |0
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Doing this:
union U {
S s{};
};
Works.
So the problem is the testcase provided is invalid code but here is a testcase
which works with clang but fails with GCC:
```
#include <atomic>
typedef std::atomic_int Atomic_Int;
struct S {
Atomic_Int v;
};
union U {
int t = 0;
S s;
};
U obj;
```