https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101579
--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> --- > > U u = ((union { V a; U b; }) w).b + ((union { V a; U b; }) w).b[1]; > return u; > > I means the result u only cared about the first half, we can drop the second > half, it's redundant. Sorry for the typo, just want to clarify result u = ((union { V a; U b; }) w).b + ((union { V a; U b; }) w).b[1] where "(union { V a; U b; }) w).b" only cares about the first half, so does "((union { V a; U b; }) w).b[1]" and "u", the second half of v is never used and can be optimized away.