Re: [Patch] OpenMP/Fortran: Use firstprivat not alloc for ptr attach for arrays

2022-11-12 Thread Thomas Schwinge
Hi Tobias! On 2022-05-13T19:44:51+0200, Jakub Jelinek via Fortran wrote: > On Fri, May 13, 2022 at 07:21:02PM +0200, Tobias Burnus wrote: >> gcc/fortran/ChangeLog: >> >> * trans-openmp.cc (gfc_trans_omp_clauses): When mapping nondescriptor >> array sections, use GOMP_MAP_FIRSTPRIVATE_P

Re: [Patch] OpenMP/Fortran: Use firstprivat not alloc for ptr attach for arrays

2022-05-13 Thread Jakub Jelinek via Fortran
On Fri, May 13, 2022 at 07:21:02PM +0200, Tobias Burnus wrote: > 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. > > lib

[Patch] OpenMP/Fortran: Use firstprivat not alloc for ptr attach for arrays

2022-05-13 Thread Tobias Burnus
Based on sollve_vv's tests/4.5/target_teams_distribute/test_target_teams_distribute_nowait.F90 As discussed, for simple pointers – like here with nondescriptor array, instead of alloc:a + pointer assign, a firstprivate + pointer assign makes more sense. It also avoids the race exposed by the so