Bump version to 19.1.0-rc3
[llvm-project.git] / offload / test / offloading / fortran / basic-target-parallel-do.f90
blob5ea505fca4d692095ceb8dcb9ec05a837d0670a6
1 ! Basic offloading test with a target region
2 ! REQUIRES: flang, amdgpu
4 ! RUN: %libomptarget-compile-fortran-generic
5 ! RUN: env LIBOMPTARGET_INFO=16 %libomptarget-run-generic 2>&1 | %fcheck-generic
6 program main
7 use omp_lib
8 integer :: x(100)
9 integer :: errors = 0
10 integer :: i
12 !$omp target parallel do map(from: x)
13 do i = 1, 100
14 x(i) = i
15 end do
16 !$omp end target parallel do
17 do i = 1, 100
18 if ( x(i) .ne. i ) then
19 errors = errors + 1
20 end if
21 end do
23 print *,"number of errors: ", errors
25 end program main
27 ! CHECK: "PluginInterface" device {{[0-9]+}} info: Launching kernel {{.*}}
28 ! CHECK: number of errors: 0