-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang][OpenMP] Add fortran test with basic target region
This patch adds a test that uses a target region to set a scalar value. It also adds rules in lit.cfg to handle fortran testing. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D159216
- Loading branch information
Showing
4 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
openmp/libomptarget/test/offloading/fortran/basic_target_region.f90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
! Basic offloading test with a target region | ||
! REQUIRES: flang, amdgcn-amd-amdhsa | ||
! UNSUPPORTED: nvptx64-nvidia-cuda | ||
! 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 | ||
integer :: x; | ||
x = 0 | ||
!$omp target map(from:x) | ||
x = 5 | ||
!$omp end target | ||
print *, "x = ", x | ||
end program main | ||
|
||
! CHECK: x = 5 | ||
|