[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 example that would require copy-in on the host, but I don't know how it's supported on the device:
```
module m23
  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_device_pointer_rhs
  use m23
  real, device, target :: base(100)
  real, device, pointer :: p(:)
  type(t) :: tee
  p => base(1:100:2)
  tee = p
end subroutine
```

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


More information about the flang-commits mailing list