}
}
-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)
}
-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)
{
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;
integer :: i
!$acc parallel
- !$acc loop gang(5) ! { dg-error "num arguments" }
+ !$acc loop gang(5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc loop gang(num:5) ! { dg-error "num arguments" }
+ !$acc loop gang(num:5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc loop worker(5) ! { dg-error "num arguments" }
+ !$acc loop worker(5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc loop worker(num:5) ! { dg-error "num arguments" }
+ !$acc loop worker(num:5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc loop vector(5) ! { dg-error "length arguments" }
+ !$acc loop vector(5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc loop vector(length:5) ! { dg-error "length arguments" }
+ !$acc loop vector(length:5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
!$acc end parallel
- !$acc parallel loop gang(5) ! { dg-error "num arguments" }
+ !$acc parallel loop gang(5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc parallel loop gang(num:5) ! { dg-error "num arguments" }
+ !$acc parallel loop gang(num:5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc parallel loop worker(5) ! { dg-error "num arguments" }
+ !$acc parallel loop worker(5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc parallel loop worker(num:5) ! { dg-error "num arguments" }
+ !$acc parallel loop worker(num:5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc parallel loop vector(5) ! { dg-error "length arguments" }
+ !$acc parallel loop vector(5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
- !$acc parallel loop vector(length:5) ! { dg-error "length arguments" }
+ !$acc parallel loop vector(length:5) ! { dg-error "argument not permitted" }
DO i = 1,10
ENDDO
end