brintos

brintos / llvm-project-archived public Read only

0
0
Text · 956 B · 578c55b Raw
40 lines · plain
1! Testing the Semantic failure of forming loop sequences under regular OpenMP directives 2 3!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=604 5subroutine loop_transformation_construct16  implicit none7  integer, parameter :: i = 58  integer :: x9  integer :: v(i)10 11  ! Only 1 do loop is associated with the OMP DO directive so the END DO directive is unmatched12  !$omp do13  do x = 1, i14    v(x) = v(x) * 215  end do16  do x = 1, i17    v(x) = v(x) * 218  end do19  !ERROR: Misplaced OpenMP end-directive20  !$omp end do21end subroutine22 23subroutine loop_transformation_construct224  implicit none25  integer, parameter :: i = 526  integer :: x27  integer :: v(i)28 29  ! Only 1 do loop is associated with the OMP TILE directive so the END TILE directive is unmatched30  !$omp tile sizes(2)31  do x = 1, i32    v(x) = v(x) * 233  end do34  do x = 1, i35    v(x) = v(x) * 236  end do37  !ERROR: Misplaced OpenMP end-directive38  !$omp end tile39end subroutine40