[flang][OpenMP][debug] runtime calls in a reducing worksharing construct are attributed to a line in a different subroutine
Open
flang:openmp
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Consider the following testcase:
```fortran
subroutine first_user(a, s)
integer :: a, s, i
s = 0
!$omp parallel do reduction(+:s) ! line 4
do i = 1, 4
s = s + a
end do
!$omp end parallel do
end subroutine first_user
subroutine second_user(a, s)
integer :: a, s, i
s = 0
!$omp parallel do reduction(+:s) ! line 14
do i = 1, 4
s = s + a
end do
!$omp end parallel do
end subroutine second_user
```
```
flang -fopenmp -g -O0 -S -emit-llvm test.f90
```
Inside `second_user_..omp_par`, many runtime call reports line 4, which is `first_user`'s directive.
Contributor guide
Assessment
This issue has not been assessed yet.