aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2020-10-27 10:43:27 +0100
committerThomas Schwinge <thomas@codesourcery.com>2020-11-06 14:01:35 +0100
commit4c27f900950ed0ecb2897a8931c5cc348b1980be (patch)
tree761ddfdcdccd901aff119dcafbcd0d9b3a18d18b /gcc/fortran/openmp.c
parent52b74462176e4741ce1248c055e6bb1cb902c025 (diff)
downloadgcc-4c27f900950ed0ecb2897a8931c5cc348b1980be.zip
gcc-4c27f900950ed0ecb2897a8931c5cc348b1980be.tar.gz
gcc-4c27f900950ed0ecb2897a8931c5cc348b1980be.tar.bz2
[Fortran] Remove OpenACC 'loop' inside 'parallel' special-case code
Instead, use the generic middle-end code, like already used for Fortran OpenACC 'loop' inside other compute constructs, orphaned 'loop' constructs, and C, C++ generally. gcc/fortran/ * openmp.c (oacc_is_parallel, resolve_oacc_params_in_parallel): Remove. (resolve_oacc_loop_blocks): Don't call the former. gcc/testsuite/ * gfortran.dg/goacc/loop-2-parallel-3.f95: Adjust.
Diffstat (limited to 'gcc/fortran/openmp.c')
-rw-r--r--gcc/fortran/openmp.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c
index 1891ac5..2270c85 100644
--- a/gcc/fortran/openmp.c
+++ b/gcc/fortran/openmp.c
@@ -6403,11 +6403,6 @@ resolve_omp_do (gfc_code *code)
}
}
-static bool
-oacc_is_parallel (gfc_code *code)
-{
- return code->op == EXEC_OACC_PARALLEL || code->op == EXEC_OACC_PARALLEL_LOOP;
-}
static gfc_statement
omp_code_to_statement (gfc_code *code)
@@ -6667,26 +6662,6 @@ resolve_oacc_nested_loops (gfc_code *code, gfc_code* do_code, int collapse,
static void
-resolve_oacc_params_in_parallel (gfc_code *code, const char *clause,
- const char *arg)
-{
- fortran_omp_context *c;
-
- if (oacc_is_parallel (code))
- gfc_error ("!$ACC LOOP %s in PARALLEL region doesn't allow "
- "%s arguments at %L", clause, arg, &code->loc);
- for (c = omp_current_ctx; c; c = c->previous)
- {
- if (oacc_is_loop (c->code))
- break;
- if (oacc_is_parallel (c->code))
- gfc_error ("!$ACC LOOP %s in PARALLEL region doesn't allow "
- "%s arguments at %L", clause, arg, &code->loc);
- }
-}
-
-
-static void
resolve_oacc_loop_blocks (gfc_code *code)
{
if (!oacc_is_loop (code))
@@ -6697,18 +6672,6 @@ resolve_oacc_loop_blocks (gfc_code *code)
gfc_error ("Tiled loop cannot be parallelized across gangs, workers and "
"vectors at the same time at %L", &code->loc);
- if (code->ext.omp_clauses->gang
- && code->ext.omp_clauses->gang_num_expr)
- resolve_oacc_params_in_parallel (code, "GANG", "num");
-
- if (code->ext.omp_clauses->worker
- && code->ext.omp_clauses->worker_expr)
- resolve_oacc_params_in_parallel (code, "WORKER", "num");
-
- if (code->ext.omp_clauses->vector
- && code->ext.omp_clauses->vector_expr)
- resolve_oacc_params_in_parallel (code, "VECTOR", "length");
-
if (code->ext.omp_clauses->tile_list)
{
gfc_expr_list *el;