[all-commits] [llvm/llvm-project] 543f4c: [flang][openacc][cuda] Recover acc routine bind in...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Wed Sep 16 11:43:26 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 543f4c964c423f78b1f1589a7c38b0273bcef1d6
      https://github.com/llvm/llvm-project/commit/543f4c964c423f78b1f1589a7c38b0273bcef1d6
  Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
  Date:   2026-09-16 (Wed, 16 Sep 2026)

  Changed paths:
    M flang/lib/Semantics/mod-file.cpp
    M flang/lib/Semantics/resolve-directives.cpp
    A flang/test/Lower/OpenACC/acc-routine-bind-cuda-modfile.cuf

  Log Message:
  -----------
  [flang][openacc][cuda] Recover acc routine bind info in CUDA Fortran module reads (#223595)

CUDA Fortran device code can call a procedure whose device-side symbol
is given by `acc routine bind(...)` in the module that declares it.
The using translation unit is often compiled with CUDA Fortran enabled
and without an OpenACC target, so the `$acc` sentinel was never
recognized when re-parsing the module file and the bind clause was
dropped.
Enable OpenACC while reading module files under CUDA Fortran as well,
and resolve the recovered directives onto the imported symbols. User
`$acc` in the main source remains ignored without `-fopenacc`; only
directives that already survived into the `.mod` are honored.
A bind(C) host name and an acc bind device name on the same procedure
is the dual-name rule in OpenACC §2.15.1.



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