[flang-commits] [flang] [flang][OpenMP] Add semantic check for target construct (PR #73697)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Thu Nov 30 04:30:10 PST 2023
kiranchandramohan wrote:
This would not work if it is inside a different function right?
```
program main
use omp_lib
integer :: x, y
contains
subroutine foo()
!$omp target
call tmp()
!$omp end target
end subroutine
subroutine tmp()
x = omp_get_default_device()
y = omp_get_num_devices()
call omp_set_default_device(x)
end subroutine
end program
```
https://github.com/llvm/llvm-project/pull/73697
More information about the flang-commits
mailing list