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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.4
                 CC|                            |sandra at gcc dot gnu.org

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> No, it is not shared by all threads.  The int sum = 0; declaration is still
> inside of
>   #pragma omp parallel shared(A)

OK, I have simplified it too much. The larger program had:

    #pragma omp target teams distribute parallel for collapse(2)

and then the gimple dump has:

  int sum;
  #pragma omp distribute collapse(2) private(j.31) private(i.30)
    for (i.30 = 0; i.30 < D.3342; i.30 = i.30 + 1)
      for (j.31 = 0; j.31 < D.3344; j.31 = j.31 + 1)
        {
          #pragma omp parallel shared(D.3344) shared(D.3342) shared(sum) \
                               shared(A) shared(N)

which has the sharing issue.

* * *

> BTW, it changed with r14-3490-g53891f18f32588d86ba0ec1c5e6206df63be714b

which is:

commit 53891f18f32588d86ba0ec1c5e6206df63be714b
Author: Sandra Loosemore
Date:   Thu Aug 24 17:35:00 2023 +0000

    OpenMP: C++ support for imperfectly-nested loops

Reply via email to