[all-commits] [llvm/llvm-project] a96b46: [flang] Lower BIND(C) module variables (#78279)
jeanPerier via All-commits
all-commits at lists.llvm.org
Wed Jan 17 08:44:51 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a96b4671b97b167230986bd2811676064c608596
https://github.com/llvm/llvm-project/commit/a96b4671b97b167230986bd2811676064c608596
Author: jeanPerier <jperier at nvidia.com>
Date: 2024-01-17 (Wed, 17 Jan 2024)
Changed paths:
M flang/lib/Lower/ConvertVariable.cpp
A flang/test/Lower/HLFIR/bindc-module-var.f90
Log Message:
-----------
[flang] Lower BIND(C) module variables (#78279)
Lower initialized BIND(C) module variable as regular module variable,
except that the fir.global symbol name is the binding label.
For uninitialized variables, add the common linkage so that C code may
define the variables. The standard does not provide a way to indicate
that a variable is defined in C, but there are use cases.
Beware that if the module file compiled object is added to a shared
library, the variable will become a regular global definition and may
override the C variable depending on the linking order.
More information about the All-commits
mailing list