blob: 88c3bd2bae4e02bc3b77121ac57f670243ac55c8 (
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
28
29
30
31
32
33
34
35
36
37
38
39
|
! Testing the Semantic failure of forming loop sequences under regular OpenMP directives
!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=60
subroutine loop_transformation_construct1
implicit none
integer, parameter :: i = 5
integer :: x
integer :: v(i)
! Only 1 do loop is associated with the OMP DO directive so the END DO directive is unmatched
!$omp do
do x = 1, i
v(x) = v(x) * 2
end do
do x = 1, i
v(x) = v(x) * 2
end do
!ERROR: The END DO directive must follow the DO loop associated with the loop construct
!$omp end do
end subroutine
subroutine loop_transformation_construct2
implicit none
integer, parameter :: i = 5
integer :: x
integer :: v(i)
! Only 1 do loop is associated with the OMP TILE directive so the END TILE directive is unmatched
!$omp tile sizes(2)
do x = 1, i
v(x) = v(x) * 2
end do
do x = 1, i
v(x) = v(x) * 2
end do
!ERROR: The END TILE directive must follow the DO loop associated with the loop construct
!$omp end tile
end subroutine
|