Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Tobias Burnus
On 09.12.20 12:36, Thomas Schwinge wrote: I'm confirming that it seems to work (that is, doesn't seem to cause any obvious interference); OK to verify/document that as in the attached "Add 'gfortran.dg/goacc-gomp/omp-scan-1-if_present.f90'"? I don't think the testcase is useful, but I wouldn't

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Thomas Schwinge
Hi! On 2020-12-09T12:51:57+0100, Jakub Jelinek wrote: > On Wed, Dec 09, 2020 at 12:36:26PM +0100, Thomas Schwinge wrote: >> Yeah, that re-purposing of 'if_present' made me raise an eyebrow, too. > > I've missed yesterday that the if_present is on the EXEC_OMP_SCAN, not on > some outer EXEC that c

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 09, 2020 at 12:36:26PM +0100, Thomas Schwinge wrote: > Yeah, that re-purposing of 'if_present' made me raise an eyebrow, too. I've missed yesterday that the if_present is on the EXEC_OMP_SCAN, not on some outer EXEC that could be arbitrary and as !$omp scan can have only exclusive and

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Thomas Schwinge
Hi! On 2020-12-09T12:06:21+0100, Tobias Burnus wrote: > On 08.12.20 13:30, Jakub Jelinek wrote: >> On Tue, Dec 08, 2020 at 01:13:07PM +0100, Tobias Burnus wrote: >>> +case EXEC_OMP_SCAN: >>> + /* Flag is only used to checking, hence, it is unset afterwards. */ >>> + if (!code->ext.

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-09 Thread Tobias Burnus
On 08.12.20 13:30, Jakub Jelinek wrote: On Tue, Dec 08, 2020 at 01:13:07PM +0100, Tobias Burnus wrote: +if (list == OMP_LIST_REDUCTION) + has_inscan = true; This looks weird, I would have expected if (list == OMP_LIST_REDUCTION_INSCAN) That's not only weird, that was

Re: [Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-08 Thread Jakub Jelinek via Gcc-patches
On Tue, Dec 08, 2020 at 01:13:07PM +0100, Tobias Burnus wrote: > + if (list == OMP_LIST_REDUCTION) > + has_inscan = true; This looks weird, I would have expected if (list == OMP_LIST_REDUCTION_INSCAN) > @@ -6151,6 +6203,28 @@ gfc_resolve_omp_do_blocks (gfc_code *code, >

[Patch] Fortran: Add 'omp scan' support of OpenMP 5.0

2020-12-08 Thread Tobias Burnus
In a previous patch, the 'inscan' reduction-clause modifier was added. This patch add the associated 'omp scan' for two reasons: First, to make it actually usable and, secondly, to avoid some corner cases where 'inscan' slips through without the required 'sorry' (as it can happen with the current