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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[OpenMP] GCC wrongly        |[OpenMP] GCC wrongly
                   |rejects                     |rejects
                   |depend(out:var%a(1:10))     |depend(out:var%a(1:10)) -
                   |                            |likewise for C/C++'s
                   |                            |s.a[1:10]

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
OpenMP 6.0, "17.9.5 depend Clause":

"The list items that appear in the depend clause may include array sections or
the omp_all_memory reserved locator."

* * *

There is also an issue for C/C++ - as the following example illustrates,
that is accepted by ICX and Clang:


struct t {
  float *a;
} s;

void f()
{
  #pragma omp task depend(out:s.a[1:10])
    ;
}


GCC rejects it with:

foo.c:7:36: error: expected ‘]’ before ‘:’ token
    7 |   #pragma omp task depend(out:s.a[1:10])

Reply via email to