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)
34 !ERROR: DO loop after the PARALLEL DO directive must have loop control
42 ! Loop association check
44 ! If an end do directive follows a do-construct in which several DO
45 ! statements share a DO termination statement, then a do directive
46 ! can only be specified for the outermost of these DO statements.
52 !ERROR: The ENDDO directive must follow the DO loop associated with the loop construct
55 !$omp parallel do copyin(a)
69 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
79 !$omp parallel do copyin(a)
85 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
87 !$omp parallel do private(c)
90 !ERROR: A DO loop must follow the PARALLEL DO directive
91 !$omp parallel do shared(b)
94 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
98 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
103 do j
= 2*i
*N
, (2*i
+1)*N
107 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
108 !$omp end parallel do
110 !ERROR: A DO loop must follow the PARALLEL DO directive
111 !$omp parallel do private(c)
112 5 FORMAT (1PE12
.4
, I10
)
116 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
117 !$omp end parallel do
119 !$omp parallel do simd
123 !$omp end parallel do simd
124 !ERROR: The END PARALLEL DO SIMD directive must follow the DO loop associated with the loop construct
125 !$omp end parallel do simd