Skip to content

Commit ee43128

Browse files
[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.
1 parent 9ef2ac3 commit ee43128

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
! Basic offloading test with a target region
2+
! REQUIRES: flang
3+
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
4+
! UNSUPPORTED: aarch64-unknown-linux-gnu
5+
! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
6+
! UNSUPPORTED: x86_64-pc-linux-gnu
7+
! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
8+
9+
! RUN: %libomptarget-compile-fortran-run-and-check-generic
10+
program main
11+
use omp_lib
12+
integer :: x
13+
14+
!$omp target parallel map(from: x)
15+
x = omp_get_num_threads()
16+
!$omp end target parallel
17+
print *,"parallel = ", (x .ne. 1)
18+
19+
end program main
20+
21+
! CHECK: parallel = T

0 commit comments

Comments
 (0)