[Openmp-commits] [openmp] ee43128 - [NFC][OpenMP][Flang] Add smoke test for omp target parallel (#77579)
via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 11 01:18:16 PST 2024
Author: Dominik Adamski
Date: 2024-01-11T10:18:11+01:00
New Revision: ee431288a6639b3bdc07b819f5d584bfb39793ed
URL: https://github.com/llvm/llvm-project/commit/ee431288a6639b3bdc07b819f5d584bfb39793ed
DIFF: https://github.com/llvm/llvm-project/commit/ee431288a6639b3bdc07b819f5d584bfb39793ed.diff
LOG: [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.
Added:
openmp/libomptarget/test/offloading/fortran/basic-target-parallel-region.f90
Modified:
Removed:
################################################################################
diff --git a/openmp/libomptarget/test/offloading/fortran/basic-target-parallel-region.f90 b/openmp/libomptarget/test/offloading/fortran/basic-target-parallel-region.f90
new file mode 100644
index 00000000000000..54341f7c40ff3b
--- /dev/null
+++ b/openmp/libomptarget/test/offloading/fortran/basic-target-parallel-region.f90
@@ -0,0 +1,21 @@
+! 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
More information about the Openmp-commits
mailing list