[flang-commits] [flang] [flang][cuda][openacc] Resolve DEVICE dummies against !$acc data mapped objects (PR #225899)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Wed Sep 23 14:01:22 PDT 2026
clementval wrote:
> For a component or common block member in the clause, for example `copyin(x%c)` and then `call dev(x%c)`, semantics still marks `x` and picks the DEVICE specific, but lowering skips components and common block members under deviceBindingsOnly, so the call gets the host address. Should semantics only mark whole objects, so these keep resolving to the host specific as today?
For these two cases, semantics already does not mark a device mapping, so they keep resolving to the host specific.
copyin(x%c) hits ContainsStructureComponent() and returns before AddOpenACCMappedSymbol(), so neither x nor the component is treated as device-mapped. I would say component is currently out of scope of this extension.
copyin(/blk/) no longer records COMMON members as mapped (lowering has no device binding for them under deviceBindingsOnly).
A member listed as a designator (copyin(member)) is a whole object: it is marked, and lowering remaps that symbol rather than the COMMON block, so the DEVICE specific and the device address stay in sync.
Restricting the mapped-symbol set to preciseDesignator() would also exclude array sections. That is a separate follow-up; it is not required for components or named COMMON.
https://github.com/llvm/llvm-project/pull/225899
More information about the flang-commits
mailing list