[flang-commits] [flang] a9b3f20 - [flang] Fix regression in submodule symbol checking (#69778)
via flang-commits
flang-commits at lists.llvm.org
Tue Oct 31 10:49:05 PDT 2023
Author: Peter Klausler
Date: 2023-10-31T10:49:01-07:00
New Revision: a9b3f200159595ed8f13cc891ae34291020ba111
URL: https://github.com/llvm/llvm-project/commit/a9b3f200159595ed8f13cc891ae34291020ba111
DIFF: https://github.com/llvm/llvm-project/commit/a9b3f200159595ed8f13cc891ae34291020ba111.diff
LOG: [flang] Fix regression in submodule symbol checking (#69778)
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.
Added:
Modified:
flang/lib/Semantics/check-declarations.cpp
Removed:
################################################################################
diff --git a/flang/lib/Semantics/check-declarations.cpp b/flang/lib/Semantics/check-declarations.cpp
index ce16b2df54b050f..87db92c6fc49362 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);
}
More information about the flang-commits
mailing list