[flang-commits] [flang] [flang][OpenACC] Release declare-create allocatable on deallocate (PR #220541)

Razvan Lupusoru via flang-commits flang-commits at lists.llvm.org
Wed Sep 2 10:03:31 PDT 2026


https://github.com/razvanlupusoru commented:

After a host deallocate, what happens for compute regions that read the variable?

Namely, what happens if we have:
```
module m
  real, allocatable :: a(:)
  !$acc declare create(a)
end module
program p
  use m
  logical :: ok
  allocate(a(10))
  deallocate(a)
  ! Host is unallocated here. Does the device match?
  !$acc serial copyout(ok)
    ok = .not. allocated(a)
  !$acc end serial
  print *, 'device sees unallocated:', ok   ! expect T
end program
```

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


More information about the flang-commits mailing list