]> git.ipfire.org Git - thirdparty/gcc.git/commit
Re OpenACC "gang reduction on an orphan loop" error message
authorFrederik Harwath <frederik@codesourcery.com>
Mon, 20 Jul 2020 09:24:21 +0000 (11:24 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 30 Nov 2021 11:59:07 +0000 (12:59 +0100)
commitc4f4c60457d1657cbd72015de3d818eb6462a0e9
tree299f6d0e98fbd3b0ff6a975bc3862b44961c6b90
parentf1a58ab0db20c0862e8b5039bd448fc8c9799cac
Re OpenACC "gang reduction on an orphan loop" error message

Follow-up to preceding commit 2b7dac2c0dcb087da9e4018943c023c0678234a3
"Make OpenACC orphan gang reductions errors".

gcc/fortran/
* openmp.c (oacc_is_parallel_or_serial): Evolve into...
(oacc_is_compute_construct): ... this function.
(resolve_oacc_loop_blocks): Use "oacc_is_compute_construct"
instead of "oacc_is_parallel_or_serial" for checking that a
loop is not orphaned.
gcc/testsuite/
* gfortran.dg/goacc/orphan-reductions-3.f90: New test
verifying that the "gang reduction on an orphan loop" error message
is not emitted for non-orphaned loops.
* c-c++-common/goacc/orphan-reductions-3.c: Likewise for C and C++.

Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
gcc/fortran/openmp.c
gcc/testsuite/c-c++-common/goacc/orphan-reductions-3.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/orphan-reductions-3.f90 [new file with mode: 0644]