https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96629
Jeffrey A. Law <law at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org --- Comment #4 from Jeffrey A. Law <law at gcc dot gnu.org> --- It's worth noting that at -O2, -O3 and -Ofast the warning does not trigger. I haven't dug deeply as this is fairly common. At higher optimization levels the various optimizers try harder to find and eliminate redundancies.