[flang-commits] [flang] [flang][cuda] Implicitly attribute ALLOCATABLE/POINTER components as managed (PR #223087)

Zhen Wang via flang-commits flang-commits at lists.llvm.org
Fri Sep 18 10:48:58 PDT 2026


wangzpgi wrote:

For this example under -gpu=managed:

```fortran
module m
  type :: t
    real, allocatable :: a(:)
  end type
end module

subroutine s()
  use m
  type(t) :: obj        ! no CUDA attribute on obj itself
  allocate(obj%a(4))
end subroutine
```

is only obj%a managed, or is obj itself managed too? If obj is also managed, is that the intention? NV keeps obj as a normal host variable and only puts obj%a in managed memory.

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


More information about the flang-commits mailing list