[flang-commits] [flang] [flang] Fix regression in submodule symbol checking (PR #69778)
via flang-commits
flang-commits at lists.llvm.org
Fri Oct 20 13:52:34 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-semantics
Author: Peter Klausler (klausler)
<details>
<summary>Changes</summary>
The change https://github.com/llvm/llvm-project/pull/67361 removed submodule name symbols from the name dictionaries of their parent (sub)modules to prevent needless errors about name clashes, but these symbols still need to be checked for things like excessive length.
---
Full diff: https://github.com/llvm/llvm-project/pull/69778.diff
1 Files Affected:
- (modified) flang/lib/Semantics/check-declarations.cpp (+4)
``````````diff
diff --git a/flang/lib/Semantics/check-declarations.cpp b/flang/lib/Semantics/check-declarations.cpp
index 2c2866d590ae5a4..c3a333b5917d2fd 100644
--- a/flang/lib/Semantics/check-declarations.cpp
+++ b/flang/lib/Semantics/check-declarations.cpp
@@ -2395,6 +2395,10 @@ void CheckHelper::Check(const Scope &scope) {
for (const auto &pair : scope) {
Check(*pair.second);
}
+ if (scope.IsSubmodule() && scope.symbol()) {
+ // Submodule names are not in their parent's scopes
+ Check(*scope.symbol());
+ }
for (const auto &pair : scope.commonBlocks()) {
CheckCommonBlock(*pair.second);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/69778
More information about the flang-commits
mailing list