[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:

(Note: code examples below were generated by AI.)

What about copy-in case, e.g.
```
module m
  type t
    real :: x(50)
  end type
  interface assignment(=)
    module procedure assign_t
  end interface
contains
  subroutine assign_t(host_t, dev_x)
    type(t), intent(inout) :: host_t
    real, device, intent(in) :: dev_x(50)
    host_t%x = dev_x
  end subroutine
end module

subroutine test
  use m
  real, device :: x(100)
  type(t) :: tee
  tee = x(1:100:2)
end subroutine
```
Is this supported? 

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


More information about the flang-commits mailing list