Skip to content

Commit a9b3f20

Browse files
authored
[flang] Fix regression in submodule symbol checking (#69778)
The change #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.
1 parent fab5c8f commit a9b3f20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flang/lib/Semantics/check-declarations.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,6 +2395,10 @@ void CheckHelper::Check(const Scope &scope) {
23952395
for (const auto &pair : scope) {
23962396
Check(*pair.second);
23972397
}
2398+
if (scope.IsSubmodule() && scope.symbol()) {
2399+
// Submodule names are not in their parent's scopes
2400+
Check(*scope.symbol());
2401+
}
23982402
for (const auto &pair : scope.commonBlocks()) {
23992403
CheckCommonBlock(*pair.second);
24002404
}

0 commit comments

Comments
 (0)