https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103724
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |9.5 Status|UNCONFIRMED |NEW Known to fail| |6.3.0, 6.4.0, 7.1.0 Ever confirmed|0 |1 Last reconfirmed| |2021-12-18 Known to work| |5.5.0, 6.1.0, 6.2.0 Summary|invalid warning: iteration |[9/10/11/12 Regression] |7 invokes undefined |invalid warning: iteration |behavior |7 invokes undefined | |behavior --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. GCC is completely unrolling this loop and then not knowing that b is 8 warns about it. Though I do find it interesting how 6.2.0 doesn't warn but 6.3.0 does.