https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106662
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- So, if you want to make the testcase working after changing for to for simd, one would need to use 2 variables instead of 1, one that is firstprivate and one that is lastprivate, and just j = k + i; if k is firstprivate and j is lastprivate.