aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2018-12-09 13:47:58 +0100
committerThomas Schwinge <tschwinge@gcc.gnu.org>2018-12-09 13:47:58 +0100
commit4b195d270ca3fb13ffa0881cf0b4e92b25f7a560 (patch)
tree0c21cdb822e340a71667bbdae9f6effc634cb31f /gcc/fortran/openmp.c
parent877009a5d9813da7aaf20ef3eb002d84644364dc (diff)
downloadgcc-4b195d270ca3fb13ffa0881cf0b4e92b25f7a560.zip
gcc-4b195d270ca3fb13ffa0881cf0b4e92b25f7a560.tar.gz
gcc-4b195d270ca3fb13ffa0881cf0b4e92b25f7a560.tar.bz2
Use existing middle end checking for Fortran OpenACC loop clauses
Don't duplicate in the Fortran front end what's generically being checked in the middle end. gcc/fortran/ * openmp.c (resolve_oacc_loop_blocks): Remove checking of OpenACC loop clauses. gcc/testsuite/ * gfortran.dg/goacc/loop-2-kernels.f95: Update. * gfortran.dg/goacc/loop-2-parallel.f95: Likewise. * gfortran.dg/goacc/nested-parallelism.f90: Likewise. From-SVN: r266922
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r--gcc/fortran/openmp.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index d97b8bf..261a54a 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -5659,12 +5659,6 @@ oacc_is_parallel (gfc_code *code)
return code->op == EXEC_OACC_PARALLEL || code->op == EXEC_OACC_PARALLEL_LOOP;
}
-static bool
-oacc_is_kernels (gfc_code *code)
-{
- return code->op == EXEC_OACC_KERNELS || code->op == EXEC_OACC_KERNELS_LOOP;
-}
-
static gfc_statement
omp_code_to_statement (gfc_code *code)
{
@@ -5846,73 +5840,9 @@ resolve_oacc_params_in_parallel (gfc_code *code, const char *clause,
static void
resolve_oacc_loop_blocks (gfc_code *code)
{
- fortran_omp_context *c;
-
if (!oacc_is_loop (code))
return;
- if (code->op == EXEC_OACC_LOOP)
- for (c = omp_current_ctx; c; c = c->previous)
- {
- if (oacc_is_loop (c->code))
- {
- if (code->ext.omp_clauses->gang)
- {
- if (c->code->ext.omp_clauses->gang)
- gfc_error ("Loop parallelized across gangs is not allowed "
- "inside another loop parallelized across gangs at %L",
- &code->loc);
- if (c->code->ext.omp_clauses->worker)
- gfc_error ("Loop parallelized across gangs is not allowed "
- "inside loop parallelized across workers at %L",
- &code->loc);
- if (c->code->ext.omp_clauses->vector)
- gfc_error ("Loop parallelized across gangs is not allowed "
- "inside loop parallelized across vectors at %L",
- &code->loc);
- }
- if (code->ext.omp_clauses->worker)
- {
- if (c->code->ext.omp_clauses->worker)
- gfc_error ("Loop parallelized across workers is not allowed "
- "inside another loop parallelized across workers at %L",
- &code->loc);
- if (c->code->ext.omp_clauses->vector)
- gfc_error ("Loop parallelized across workers is not allowed "
- "inside another loop parallelized across vectors at %L",
- &code->loc);
- }
- if (code->ext.omp_clauses->vector)
- if (c->code->ext.omp_clauses->vector)
- gfc_error ("Loop parallelized across vectors is not allowed "
- "inside another loop parallelized across vectors at %L",
- &code->loc);
- }
-
- if (oacc_is_parallel (c->code) || oacc_is_kernels (c->code))
- break;
- }
-
- if (code->ext.omp_clauses->seq)
- {
- if (code->ext.omp_clauses->gang)
- gfc_error ("Clause SEQ conflicts with GANG at %L", &code->loc);
- if (code->ext.omp_clauses->worker)
- gfc_error ("Clause SEQ conflicts with WORKER at %L", &code->loc);
- if (code->ext.omp_clauses->vector)
- gfc_error ("Clause SEQ conflicts with VECTOR at %L", &code->loc);
- if (code->ext.omp_clauses->par_auto)
- gfc_error ("Clause SEQ conflicts with AUTO at %L", &code->loc);
- }
- if (code->ext.omp_clauses->par_auto)
- {
- if (code->ext.omp_clauses->gang)
- gfc_error ("Clause AUTO conflicts with GANG at %L", &code->loc);
- if (code->ext.omp_clauses->worker)
- gfc_error ("Clause AUTO conflicts with WORKER at %L", &code->loc);
- if (code->ext.omp_clauses->vector)
- gfc_error ("Clause AUTO conflicts with VECTOR at %L", &code->loc);
- }
if (code->ext.omp_clauses->tile_list && code->ext.omp_clauses->gang
&& code->ext.omp_clauses->worker && code->ext.omp_clauses->vector)
gfc_error ("Tiled loop cannot be parallelized across gangs, workers and "