1 ! RUN: %python %S/../test_errors.py %s %flang -fopenmp
3 ! Check the association between OpenMPLoopConstruct and DoConstruct
7 integer, parameter :: num
= 16
20 DO CONCURRENT (i
= 1:N
)
24 !$omp parallel do simd
25 outer
: DO WHILE (c
> 1)
26 inner
: do while (b
> 100)
33 ! Accept directives between parallel do and actual loop.
42 !ERROR: DO loop after the PARALLEL DO directive must have loop control
50 ! Loop association check
52 ! If an end do directive follows a do-construct in which several DO
53 ! statements share a DO termination statement, then a do directive
54 ! can only be specified for the outermost of these DO statements.
60 !ERROR: The ENDDO directive must follow the DO loop associated with the loop construct
63 !$omp parallel do copyin(a)
77 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
87 !$omp parallel do copyin(a)
93 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
95 !$omp parallel do private(c)
98 !ERROR: A DO loop must follow the PARALLEL DO directive
99 !$omp parallel do shared(b)
102 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
103 !$omp end parallel do
106 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
107 !$omp end parallel do
111 do j
= 2*i
*N
, (2*i
+1)*N
115 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
116 !$omp end parallel do
118 !ERROR: A DO loop must follow the PARALLEL DO directive
119 !$omp parallel do private(c)
120 5 FORMAT (1PE12
.4
, I10
)
124 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
125 !$omp end parallel do
127 !$omp parallel do simd
131 !$omp end parallel do simd
132 !ERROR: The END PARALLEL DO SIMD directive must follow the DO loop associated with the loop construct
133 !$omp end parallel do simd
135 !ERROR: A DO loop must follow the SIMD directive
138 !ERROR: The END SIMD directive must follow the DO loop associated with the loop construct