llvm / llvm/llvm-project

[flang][OpenMP][debug] the reduction epilogue on omp parallel has no source location

Open
#222,299 0 comments 0 reactions 1 assignee Claimed by @abidh View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.