[flang] More review changes
authorEric Schweitz <eschweitz@nvidia.com>
Tue, 9 Oct 2018 23:20:01 +0000 (16:20 -0700)
committerGitHub <noreply@github.com>
Wed, 24 Oct 2018 19:22:42 +0000 (12:22 -0700)
Original-commit: flang-compiler/f18@48f34e66c8e3d47eec59bc677bc4885d19599dcf
Reviewed-on: https://github.com/flang-compiler/f18/pull/196
Tree-same-pre-rewrite: false

flang/lib/semantics/check-do-concurrent.cc

index 7fe2329..e6f6461 100644 (file)
@@ -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;
   }