[flang-commits] [flang] [flang][OpenMP] Add semantic check for target construct (PR #73697)
via flang-commits
flang-commits at lists.llvm.org
Mon Dec 4 16:19:30 PST 2023
shraiysh wrote:
I think it would be a bit tricky to solve it for general case. Consider
```fortran
subroutine foo()
!$omp target
call bar()
!$omp end target
end subroutine foo
subroutine bar()
call baz()
end subroutine bar()
subroutine baz()
omp_set_default_device(2)
end subroutine baz()
```
We might need to do some sort of call graph traversal to accurately put this semantic check. Is it ok @kiranchandramohan if we do not handle this case?
https://github.com/llvm/llvm-project/pull/73697
More information about the flang-commits
mailing list