[all-commits] [llvm/llvm-project] 5137c2: [Flang][OpenMP] Fix allocating arrays with size in...

agozillon via All-commits all-commits at lists.llvm.org
Fri Jan 3 07:46:36 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5137c209f0c19668d06e48cc4293e4c01a77c964
      https://github.com/llvm/llvm-project/commit/5137c209f0c19668d06e48cc4293e4c01a77c964
  Author: agozillon <Andrew.Gozillon at amd.com>
  Date:   2025-01-03 (Fri, 03 Jan 2025)

  Changed paths:
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    M flang/lib/Optimizer/OpenMP/MapInfoFinalization.cpp
    M flang/test/Lower/OpenMP/allocatable-array-bounds.f90
    M flang/test/Lower/OpenMP/array-bounds.f90
    M flang/test/Lower/OpenMP/derived-type-allocatable-map.f90
    A flang/test/Lower/OpenMP/local-intrinsic-sized-array-map.f90
    M flang/test/Transforms/omp-map-info-finalization.fir
    A offload/test/offloading/fortran/target-map-local-intrinisc-sized-param.f90

  Log Message:
  -----------
  [Flang][OpenMP] Fix allocating arrays with size intrinisic (#119226)

Attempt to address the following example from causing an assert or ICE:

```
   subroutine test(a)
        implicit none
        integer :: i
        real(kind=real64), dimension(:) :: a
        real(kind=real64), dimension(size(a, 1)) :: b

!$omp target map(tofrom: b)
        do i = 1, 10
            b(i) = i
        end do
!$omp end target
end subroutine
```

Where we utilise a Fortran intrinsic (size) to calculate the size of
allocatable arrays and then map it to device.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list