[flang-commits] [flang] [flang][CUDA] Preserve data attrs on assignment RHS (PR #207849)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Wed Jul 29 06:11:12 PDT 2026


================

----------------
eugeneepshteyn wrote:

Another question: is `elemental` case supported and what happens in lowering?
```
module m
  type box
    integer :: n
  end type
  interface assignment(=)
    module procedure assign_e
  end interface
contains
  elemental subroutine assign_e(lhs, rhs)
    type(box), intent(inout) :: lhs
    real, device, intent(in) :: rhs
    lhs%n = 1
  end subroutine
end module

subroutine test
  use m
  type(box) :: lhs(4)
  real, device :: dev(4)
  lhs = dev
end subroutine
```

https://github.com/llvm/llvm-project/pull/207849


More information about the flang-commits mailing list