Files
clang-p2996/openmp/libomptarget/test/offloading/fortran/basic-target-parallel-region.f90
Dominik Adamski ee431288a6 [NFC][OpenMP][Flang] Add smoke test for omp target parallel (#77579)
Added test which proves that end-to-end compilation of omp target
parallel costruct is successful for Flang compiler.
2024-01-11 10:18:11 +01:00

22 lines
547 B
Fortran

! Basic offloading test with a target region
! REQUIRES: flang
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
! UNSUPPORTED: aarch64-unknown-linux-gnu
! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
! UNSUPPORTED: x86_64-pc-linux-gnu
! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
use omp_lib
integer :: x
!$omp target parallel map(from: x)
x = omp_get_num_threads()
!$omp end target parallel
print *,"parallel = ", (x .ne. 1)
end program main
! CHECK: parallel = T