1 ! RUN: %python %S/../test_errors.py %s %flang_fc1 -fopenmp -fopenmp-version=52
3 subroutine mod_task1(x
)
4 integer, intent(inout
) :: x
6 !Correct: "parallel" directive.
7 !$omp parallel reduction(task, +:x)
14 subroutine mod_task2(x
)
15 integer, intent(inout
) :: x
17 !Correct: worksharing directive.
18 !$omp sections reduction(task, +:x)
25 subroutine mod_task3(x
)
26 integer, intent(inout
) :: x
28 !ERROR: Modifier 'TASK' on REDUCTION clause is only allowed with PARALLEL or worksharing directive
29 !$omp simd reduction(task, +:x)
36 subroutine mod_inscan1(x
)
37 integer, intent(inout
) :: x
39 !Correct: worksharing-loop directive
40 !$omp do reduction(inscan, +:x)
42 !$omp scan inclusive(x)
48 subroutine mod_inscan2(x
)
49 integer, intent(inout
) :: x
51 !Correct: worksharing-loop simd directive
52 !$omp do simd reduction(inscan, +:x)
54 !$omp scan inclusive(x)
60 subroutine mod_inscan3(x
)
61 integer, intent(inout
) :: x
63 !Correct: "simd" directive
64 !$omp simd reduction(inscan, +:x)
66 !$omp scan inclusive(x)
72 subroutine mod_inscan4(x
)
73 integer, intent(inout
) :: x
75 !ERROR: Modifier 'INSCAN' on REDUCTION clause is only allowed with WORKSHARING LOOP, WORKSHARING LOOP SIMD, or SIMD directive
76 !$omp parallel reduction(inscan, +:x)
83 subroutine mod_inscan5(x
)
84 integer, intent(inout
) :: x
86 !ERROR: Modifier 'INSCAN' on REDUCTION clause is only allowed with WORKSHARING LOOP, WORKSHARING LOOP SIMD, or SIMD directive
87 !$omp sections reduction(inscan, +:x)