diff options
Diffstat (limited to 'flang/test/Semantics/OpenMP/loop-association.f90')
| -rw-r--r-- | flang/test/Semantics/OpenMP/loop-association.f90 | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/flang/test/Semantics/OpenMP/loop-association.f90 b/flang/test/Semantics/OpenMP/loop-association.f90 index 9fac508e6128..b2898d3967a2 100644 --- a/flang/test/Semantics/OpenMP/loop-association.f90 +++ b/flang/test/Semantics/OpenMP/loop-association.f90 @@ -17,11 +17,13 @@ !$omp end parallel !$omp parallel do + !ERROR: DO CONCURRENT loops cannot form part of a loop nest. DO CONCURRENT (i = 1:N) a = 3.14 END DO !$omp parallel do simd + !ERROR: The associated loop of a loop-associated directive cannot be a DO WHILE. outer: DO WHILE (c > 1) inner: do while (b > 100) a = 3.14 @@ -31,7 +33,10 @@ END DO outer ! Accept directives between parallel do and actual loop. + !ERROR: A DO loop must follow the PARALLEL DO directive !$OMP PARALLEL DO + !WARNING: Unrecognized compiler directive was ignored [-Wignored-directive] + !ERROR: Compiler directives are not allowed inside OpenMP loop constructs !DIR$ VECTOR ALIGNED DO 20 i=1,N a = a + 0.5 @@ -39,11 +44,14 @@ !$OMP END PARALLEL DO c = 16 - !ERROR: DO loop after the PARALLEL DO directive must have loop control !$omp parallel do + !ERROR: Loop control is not present in the DO LOOP + !ERROR: The associated loop of a loop-associated directive cannot be a DO without control. do a = 3.14 c = c - 1 + !ERROR: EXIT to construct outside of PARALLEL DO construct is not allowed + !ERROR: EXIT statement terminates associated loop of an OpenMP DO construct if (c < 1) exit enddo @@ -57,9 +65,9 @@ do 100 j=1, N a = 3.14 100 continue - !ERROR: The ENDDO directive must follow the DO loop associated with the loop construct !$omp enddo + !ERROR: Non-THREADPRIVATE object 'a' in COPYIN clause !$omp parallel do copyin(a) do i = 1, N !$omp parallel do @@ -74,8 +82,6 @@ do i = 1, N enddo !$omp end parallel do - !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct - !$omp end parallel do !$omp parallel a = 3.0 @@ -84,27 +90,22 @@ enddo !$omp end do simd + !ERROR: Non-THREADPRIVATE object 'a' in COPYIN clause !$omp parallel do copyin(a) do i = 1, N enddo !$omp end parallel a = 0.0 - !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct - !$omp end parallel do !$omp parallel do private(c) do i = 1, N do j = 1, N - !ERROR: A DO loop must follow the PARALLEL DO directive + !ERROR: OpenMP loop construct should contain a DO-loop or a loop-nest-generating OpenMP construct !$omp parallel do shared(b) a = 3.14 enddo - !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct - !$omp end parallel do enddo a = 1.414 - !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct - !$omp end parallel do do i = 1, N !$omp parallel do @@ -112,29 +113,22 @@ a = 3.14 enddo enddo - !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct - !$omp end parallel do - !ERROR: A DO loop must follow the PARALLEL DO directive + !ERROR: OpenMP loop construct should contain a DO-loop or a loop-nest-generating OpenMP construct !$omp parallel do private(c) 5 FORMAT (1PE12.4, I10) do i=1, N a = 3.14 enddo - !ERROR: The END PARALLEL DO directive must follow the DO loop associated with the loop construct - !$omp end parallel do !$omp parallel do simd do i = 1, N a = 3.14 enddo !$omp end parallel do simd - !ERROR: The END PARALLEL DO SIMD directive must follow the DO loop associated with the loop construct - !$omp end parallel do simd - !ERROR: A DO loop must follow the SIMD directive + !ERROR: OpenMP loop construct should contain a DO-loop or a loop-nest-generating OpenMP construct !$omp simd - a = i + 1 - !ERROR: The END SIMD directive must follow the DO loop associated with the loop construct !$omp end simd + a = i + 1 end |
