https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78895
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 Status|UNCONFIRMED |NEW Last reconfirmed| |2016-12-22 CC| |jakub at gcc dot gnu.org Target Milestone|--- |6.4 Summary|[6 regression] wrong code |[6 Regression] wrong code |with -O1 when setting union |with -O1 when setting union |twice since 6.3 |twice since 6.3 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Reduced testcase: union U { int i; _Bool b; }; void __attribute__((noinline, noclone)) foo (union U u) { if (u.b) __builtin_abort (); } int main () { union U u; u.i = 10; u.b = 0; foo (u); return 0; } It is fre1 that removes the u.b = 0; store. Doesn't fail on the trunk, testing now if it ever failed on trunk this fall.