[flang][OpenMP][debug] the reduction epilogue on omp parallel has no source location
Open
flang:openmp
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The calls to `__kmpc_reduce`/`__kmpc_end_reduce` pair flang emits for a reduction on `!$omp parallel` carries no debug location. See the following testcase:
```fortran
subroutine reduce_par(a, s)
integer :: a, s
s = 0
!$omp parallel reduction(+:s) ! line 4
s = s + a
!$omp end parallel
end subroutine reduce_par
```
```
flang -fopenmp -g -O0 -S -emit-llvm test.f90
```
You will notice that calls to `__kmpc_reduce` and `__kmpc_end_reduce` have no !dbg metadata.
Contributor guide
Assessment
This issue has not been assessed yet.