https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107051
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to absoler from comment #2) > for gcc-13.2.0 -O2, it seems still forget to remove the load for this > reduced case: > ``` > union U0 { > short f1; > int f2; > }; > union U0 g1, g2; > > volatile int flag; > void func_1() { > union U0 d[1] = {{.f1 = 1}}; > for (; flag;) > ; > d[0] = g2; > g1 = d[0]; > } > ``` This one is handled on the trunk already. the one in comment #0 is not handled yet.