summaryrefslogtreecommitdiff
path: root/flang
diff options
context:
space:
mode:
Diffstat (limited to 'flang')
-rw-r--r--flang/lib/semantics/check-do-concurrent.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/flang/lib/semantics/check-do-concurrent.cc b/flang/lib/semantics/check-do-concurrent.cc
index 7fe23290b0ac..e6f64619098f 100644
--- a/flang/lib/semantics/check-do-concurrent.cc
+++ b/flang/lib/semantics/check-do-concurrent.cc
@@ -146,10 +146,9 @@ private:
(attrs.test(Attr::ELEMENTAL) && !attrs.test(Attr::IMPURE));
}
bool fromScope(const Symbol &symbol, const std::string &moduleName) {
- if (symbol.scope() && symbol.scope()->IsModule()) {
- if (symbol.scope()->symbol()->name().ToString() == moduleName) {
- return true;
- }
+ if (symbol.GetUltimate().owner().IsModule() &&
+ symbol.GetUltimate().owner().name().ToString() == moduleName) {
+ return true;
}
return false;
}