1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! Check OpenMP construct validity for the following directives:
4 ! 2.19.9 Ordered Construct
7 integer :: i
, j
, N
= 10
8 real :: arrayA(10), arrayB(10)
9 real, external :: foo
, bar
42 !ERROR: An ORDERED directive with SIMD clause must be closely nested in a SIMD or worksharing-loop SIMD region
53 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a SIMD, worksharing-loop, or worksharing-loop SIMD region
66 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a SIMD, worksharing-loop, or worksharing-loop SIMD region
71 !$omp end target parallel
77 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
86 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
95 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
104 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
105 !$omp ordered threads
111 !$omp parallel do ordered(1)
113 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
118 !$omp end parallel do
120 !$omp parallel do ordered(1)
122 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
123 !$omp ordered threads
127 !$omp end parallel do
129 !$omp target parallel do ordered(1)
131 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
136 !$omp end target parallel do
138 !$omp target parallel do ordered(1)
140 !ERROR: An ORDERED directive without the DEPEND clause must be closely nested in a worksharing-loop (or worksharing-loop SIMD) region with ORDERED clause without the parameter
141 !$omp ordered threads
145 !$omp end target parallel do