[flang-commits] [flang] [flang][MLIR][OpenMP] Extend delayed privatization for arrays (PR #85023)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Wed Apr 17 22:01:19 PDT 2024
ergawy wrote:
> Thank you for the patch. I was trying to understand the changes with simpler examples of the form:
>
> ```
> program main
> implicit none
> integer :: i
> real, dimension(5) :: array
>
> !$omp parallel private(array)
> array(2) = array(2) + 10
> !$omp end parallel
> end program
> ```
>
> It turns out that with `-mmlir --openmp-enable-delayed-privatization` flag, we get the following verification failure:
>
> ```
> error: loc("/home/user1/.llvm/test/par.f90":4:27): 'hlfir.declare' op of array entity with a raw address base must have a shape operand that is a shape or shapeshift
> error: loc("/home/user1/.llvm/test/par.f90":4:27): 'fir.shape' op using value defined outside the region
> error: loc("/home/user1/.llvm/test/par.f90":4:27): 'hlfir.declare' op of array entity with a raw address base must have a shape operand that is a shape or shapeshift
> ```
>
> I am not completely sure what went wrong here.
Thanks for catching that. Looking into it ...
https://github.com/llvm/llvm-project/pull/85023
More information about the flang-commits
mailing list