https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71654
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- The regression is because in GCC 5 we shorten the (int) i <= 3 compare early during FE folding while it survives as integer compare in GCC 6. This makes (int) i redundant in the conditional block.