https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108741

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
  #pragma omp simd collapse(2) lastprivate(a0,a1,j)
  for (a0 = 1; a0 <= 10; a0++)
    for (j = 1; j <= 20; j++)
      **a1 = a0;    /// Segfaults here as *a0 points to invalid memory
You mean *a1.  That testcase is invalid, when a1 is lastprivate, it's
privatized copy
is uninitialized at the start and a1 is assigned the last iteration's value.

Reply via email to