[all-commits] [llvm/llvm-project] 4e7b87: [flang][cuda] Reject CONSTANT in main program (#22...
Valentin Clement (バレンタイン クレメン) via All-commits
all-commits at lists.llvm.org
Thu Oct 1 13:14:58 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4e7b87f0dd39f21f592ca341b33b0447ea74951b
https://github.com/llvm/llvm-project/commit/4e7b87f0dd39f21f592ca341b33b0447ea74951b
Author: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
Date: 2026-10-01 (Thu, 01 Oct 2026)
Changed paths:
M flang/lib/Semantics/check-declarations.cpp
M flang/test/Semantics/CUDA/cuf03.cuf
Log Message:
-----------
[flang][cuda] Reject CONSTANT in main program (#228193)
>From the CUDA Fortran programming guide:
> In the section on variable qualifiers: "The constant variable must be
declared within a module's global data specification scope. … All host
accesses of constant memory must be through use or host association."
> In section 3.2.5, Constant data: "Constant variables and arrays can
appear in modules … Constant variables appearing in modules may be
accessed via the use statement in both host and device subprograms." The
list of allowed uses in host code includes "a named entity within a USE
statement" and "a dummy argument in a host subprogram", but not a local
declaration.
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