We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86cb8b6 commit f462bf5Copy full SHA for f462bf5
flang/lib/Semantics/resolve-directives.cpp
@@ -1707,9 +1707,10 @@ Symbol *AccAttributeVisitor::ResolveAccCommonBlockName(
1707
// Look for COMMON block in the modules
1708
for (const Scope &childScope : context_.globalScope().children()) {
1709
if (childScope.kind() == Scope::Kind::Module) {
1710
- auto *cb{childScope.FindCommonBlock(name->source)};
1711
- name->symbol = cb;
1712
- return cb;
+ if (auto *cb{childScope.FindCommonBlock(name->source)}) {
+ name->symbol = cb;
+ return cb;
1713
+ }
1714
}
1715
1716
return nullptr;
0 commit comments