diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2021-11-26 12:29:26 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2021-11-30 12:59:10 +0100 |
commit | 77d24d43644909852998043335b5a0e09d1e8f02 (patch) | |
tree | 22fe40ca5f07ac6450a8acbf250998fe02af2a5b /gcc/cp/semantics.c | |
parent | c4f4c60457d1657cbd72015de3d818eb6462a0e9 (diff) | |
download | gcc-77d24d43644909852998043335b5a0e09d1e8f02.zip gcc-77d24d43644909852998043335b5a0e09d1e8f02.tar.gz gcc-77d24d43644909852998043335b5a0e09d1e8f02.tar.bz2 |
Consolidate OpenACC "gang reduction on an orphan loop" checking
No need to implement separately in all front ends what we may implement in the
middle end, once for all.
Follow-up to preceding commit 2b7dac2c0dcb087da9e4018943c023c0678234a3
"Make OpenACC orphan gang reductions errors".
gcc/
* omp-offload.c (oacc_loop_process): Implement "gang reduction on
an orphan loop" checking.
gcc/c/
* c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
orphan loop" checking.
gcc/cp/
* semantics.c (finish_omp_clauses): Remove "gang reduction on an
orphan loop" checking.
gcc/fortran/
* openmp.c (resolve_oacc_loop_blocks): Remove "gang reduction on
an orphan loop" checking.
(oacc_is_parallel, oacc_is_kernels, oacc_is_serial)
(oacc_is_compute_construct): Remove.
gcc/testsuite/
* gfortran.dg/goacc/orphan-reductions-1.f90: Adjust.
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index c84caf4..cd19564 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -6667,14 +6667,6 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort) field_ok = ((ort & C_ORT_OMP_DECLARE_SIMD) == C_ORT_OMP); goto check_dup_generic; case OMP_CLAUSE_REDUCTION: - if (ort == C_ORT_ACC && oacc_get_fn_attrib (current_function_decl) - && omp_find_clause (clauses, OMP_CLAUSE_GANG)) - { - error_at (OMP_CLAUSE_LOCATION (c), - "gang reduction on an orphan loop"); - remove = true; - break; - } if (reduction_seen == 0) reduction_seen = OMP_CLAUSE_REDUCTION_INSCAN (c) ? -1 : 1; else if (reduction_seen != -2 |