[Flang][OpenMP] Incorrect location information for OpenMP constructs/clauses #57215
Labels
bug
Indicates an unexpected problem or unintended behavior
flang:ir
good first issue
https://github.com/llvm/llvm-project/contribute
openmp
@clementval reports that the location information for OpenMP constructs and clauses is incorrect.
In lowering, the
getCurrentLocation
function is used.getCurrentLocation
refers to the location of the last Fortran construct. The same issue in OpenACC was fixed in https://reviews.llvm.org/D131659 using thegenLocation
function. A similar approach could be used for OpenMP as well.Reproducer
For the following Fortran OpenMP program,
we get the following location information. As can be seen the location of the OpenMP construct is printed as loc1 (= line 1 column 1), this is incorrect.
The text was updated successfully, but these errors were encountered: