Skip to content

Commit

Permalink
[flang] Fix regression in submodule symbol checking (#69778)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
klausler committed Oct 31, 2023
1 parent fab5c8f commit a9b3f20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flang/lib/Semantics/check-declarations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a9b3f20

Please sign in to comment.