[flang-commits] [flang] [flang] Prevent IR name clashes between BIND(C) and external procedures (PR #66777)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Tue Sep 19 08:32:17 PDT 2023
================
@@ -2623,6 +2628,43 @@ void CheckHelper::CheckGlobalName(const Symbol &symbol) {
}
}
+void CheckHelper::CheckProcedureAssemblyName(const Symbol &symbol) {
+ if (!IsProcedure(symbol) || symbol != symbol.GetUltimate())
+ return;
+ const std::string *bindName{symbol.GetBindName()};
+ const bool hasExplicitBindingLabel{
+ symbol.GetIsExplicitBindName() && bindName};
+ if (hasExplicitBindingLabel || IsExternal(symbol)) {
----------------
klausler wrote:
Please ensure that this logic won't elicit an inappropriate error for a clash between `BIND(C,NAME="")` and `SUBROUTINE _`.
https://github.com/llvm/llvm-project/pull/66777
More information about the flang-commits
mailing list