https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90367
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think you reduced it too much. Because with the reduction the warning is correct. j[i] will be accessed above the array bounds. Though j[0] is always equal to j[0].