[flang-commits] [flang] [flang][OpenMP] Make lastprivate work with reallocated variables (PR #106559)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Thu Sep 5 03:17:50 PDT 2024
https://github.com/tblah requested changes to this pull request.
I think something in this PR has broken firstprivate with an unallocated variable:
```
program repo
integer, allocatable :: b
!$omp parallel firstprivate(b)
b = 1
!$omp end parallel
end program
```
For me this now produces a segfault, whereas it used to work correctly before this PR. I wonder if the `if` statement we removed from copyVarHLFIR was guarding this case in firstprivate. I think the right solution is to emit the if only for firstprivate.
https://github.com/llvm/llvm-project/pull/106559
More information about the flang-commits
mailing list