https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94690
--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> --- If no lastprivate is available, it is added in gimplify.c's gimplify_omp_for, line 11759: for (i = 0; i < TREE_VEC_LENGTH (OMP_FOR_INIT (for_stmt)); i++) ... if (is_doacross) ... else if (ort == ORT_SIMD) ... else if (omp_is_private (gimplify_omp_ctxp, decl, 0)) ... else omp_add_variable (gimplify_omp_ctxp, decl, GOVD_PRIVATE | GOVD_SEEN);