https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109341
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The warning is because we unswitch the loop, so we have a separate loop for h != 0 and separate loop for h == 0. And the latter obviously invokes undefined behavior (though I get it for iteration 3 rather than 7).