aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic-format-json.cc
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2022-05-13 20:00:34 +0200
committerTobias Burnus <tobias@codesourcery.com>2022-05-13 20:00:34 +0200
commita46d6268371c446566f656858aada8775a0c988e (patch)
treed8a936caa2c14b43489d72edb77c5be0e1981c8e /gcc/diagnostic-format-json.cc
parentbc25483c055d62f94f8c289f80843dda3c4a6ff4 (diff)
downloadgcc-a46d6268371c446566f656858aada8775a0c988e.zip
gcc-a46d6268371c446566f656858aada8775a0c988e.tar.gz
gcc-a46d6268371c446566f656858aada8775a0c988e.tar.bz2
OpenMP/Fortran: Use firstprivat not alloc for ptr attach for arrays
For a non-descriptor array, map(A(n:m)) was mapped as map(tofrom:A[n-1] [len: ...]) map(alloc:A [pointer assign, bias: ...]) with this patch, it is changed to map(tofrom:A[n-1] [len: ...]) map(firstprivate:A [pointer assign, bias: ...]) The latter avoids an alloc - and also avoids the race condition with nowait in the enclosed testcase. (Note: predantically, the testcase is invalid since OpenMP 5.1, violating the map clause restriction at [354:10-13]. gcc/fortran/ChangeLog: * trans-openmp.cc (gfc_trans_omp_clauses): When mapping nondescriptor array sections, use GOMP_MAP_FIRSTPRIVATE_POINTER instead of GOMP_MAP_POINTER for the pointer attachment. libgomp/ChangeLog: * testsuite/libgomp.fortran/target-nowait-array-section.f90: New test.
Diffstat (limited to 'gcc/diagnostic-format-json.cc')
0 files changed, 0 insertions, 0 deletions