[all-commits] [llvm/llvm-project] b797a6: [flang] Lower special bind(c) cases without bindin...
jeanPerier via All-commits
all-commits at lists.llvm.org
Tue Sep 26 00:29:51 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b797a6aede3dbdf7e2287e4fbde13f2550961d96
https://github.com/llvm/llvm-project/commit/b797a6aede3dbdf7e2287e4fbde13f2550961d96
Author: jeanPerier <jperier at nvidia.com>
Date: 2023-09-26 (Tue, 26 Sep 2023)
Changed paths:
M flang/lib/Lower/CallInterface.cpp
M flang/lib/Lower/Mangler.cpp
M flang/lib/Semantics/resolve-names.cpp
A flang/test/Lower/HLFIR/bindc-proc-interface.f90
A flang/test/Lower/HLFIR/bindc_empty_name.f90
A flang/test/Lower/HLFIR/bindc_internal_proc.f90
Log Message:
-----------
[flang] Lower special bind(c) cases without binding labels (#65758)
1. Deal with BIND(C,NAME="")
BIND(C,NAME="") is different from BIND(C). The latter implies that there
us a binding label which is the Fortran symbol name (no Fortran mangling
must be added like underscores). The former implies there is no binding
label (the name in the object file must be the same as if it there was
no BIND(C) attribute at all).
This is correctly implemented in the front-end, but lowering mistakenly
overrode this in the code dealing with the case where BIND(C) is
inherited from a procedure interface. Handling of this last case is moved into name
resolution.
2. Deal with BIND(C) internal procedure
Also according to 18.10.2, BIND(C) does not give a p prevent name
resolution from adding a label to them, otherwise,
bindc_internal_proc.f90 was not going through semantics (bogus error
about conflicting global names). Nothing TODO in lowering other than
removing the TODO.
More information about the All-commits
mailing list