summaryrefslogtreecommitdiff
path: root/flang/test/Semantics/OpenMP/do21.f90
blob: 2f5815c10c11a98181b750a4ec3f0f02295d94f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
! RUN: %python %S/../test_errors.py %s %flang -fopenmp
! Check for existence of loop following a DO directive

subroutine do1
  !ERROR: A DO loop must follow the DO directive
  !$omp do
end subroutine

subroutine do2
  !ERROR: A DO loop must follow the PARALLEL DO directive
  !$omp parallel do
end subroutine

subroutine do3
  !ERROR: A DO loop must follow the SIMD directive
  !$omp simd
end subroutine

subroutine do4
  !ERROR: A DO loop must follow the DO SIMD directive
  !$omp do simd
end subroutine

subroutine do5
  !ERROR: A DO loop must follow the LOOP directive
  !$omp loop
end subroutine