1 ! RUN: %S/test_errors.sh %s %t %flang -fopenmp
4 ! Check the association between OpenMPLoopConstruct and DoConstruct
8 integer, parameter :: num
= 16
21 DO CONCURRENT (i
= 1:N
)
25 !$omp parallel do simd
26 outer
: DO WHILE (c
> 1)
27 inner
: do while (b
> 100)
35 !ERROR: DO loop after the PARALLEL DO directive must have loop control
43 ! Loop association check
45 ! If an end do directive follows a do-construct in which several DO
46 ! statements share a DO termination statement, then a do directive
47 ! can only be specified for the outermost of these DO statements.
53 !ERROR: The ENDDO directive must follow the DO loop associated with the loop construct
56 !$omp parallel do copyin(a)
70 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
80 !$omp parallel do copyin(a)
86 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
88 !$omp parallel do private(c)
91 !ERROR: A DO loop must follow the PARALLEL DO directive
92 !$omp parallel do shared(b)
95 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
99 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
100 !$omp end parallel do
104 do j
= 2*i
*N
, (2*i
+1)*N
108 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
109 !$omp end parallel do
111 !ERROR: A DO loop must follow the PARALLEL DO directive
112 !$omp parallel do private(c)
113 5 FORMAT (1PE12
.4
, I10
)
117 !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct
118 !$omp end parallel do
120 !$omp parallel do simd
124 !$omp end parallel do simd
125 !ERROR: The END PARALLEL DO SIMD directive must follow the DO loop associated with the loop construct
126 !$omp end parallel do simd