[all-commits] [llvm/llvm-project] f6f08f: [flang][cuda] Use managed allocation for saved loc...

Matsu via All-commits all-commits at lists.llvm.org
Thu Jul 16 13:53:49 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f6f08fa7e5d56aa07f9ebc51500f2c9fd6df8e1b
      https://github.com/llvm/llvm-project/commit/f6f08fa7e5d56aa07f9ebc51500f2c9fd6df8e1b
  Author: Matsu <47756807+khaki3 at users.noreply.github.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M flang/lib/Semantics/resolve-names.cpp
    M flang/test/Lower/CUDA/cuda-implicit-managed-alloc.cuf

  Log Message:
  -----------
  [flang][cuda] Use managed allocation for saved locals (#210133)

Example:
```fortran
subroutine work
  real, allocatable, save :: q(:)
  allocate(q(10))
end
```

`SAVE` gives the local allocatable descriptor static storage. Implicitly
attributing it as Unified causes allocation to look it up as a
registered CUDA global, but no device symbol is registered for the
descriptor.

Fix: use Managed attribution for saved subprogram-local allocatables and
pointers, avoiding the invalid CUDA symbol lookup.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list