From bd2bf58e7a82cfbb15c11c73a2373cdc4bbe09eb Mon Sep 17 00:00:00 2001 From: peter klausler Date: Wed, 11 Sep 2019 13:15:32 -0700 Subject: [PATCH] [flang] Extend comments Original-commit: flang-compiler/f18@9f918c2559698a893aaa917dc7b109c226c6d49f Reviewed-on: https://github.com/flang-compiler/f18/pull/737 --- flang/lib/semantics/resolve-names.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flang/lib/semantics/resolve-names.cc b/flang/lib/semantics/resolve-names.cc index ddd8f5cf64a8..176c5da3aa16 100644 --- a/flang/lib/semantics/resolve-names.cc +++ b/flang/lib/semantics/resolve-names.cc @@ -1655,7 +1655,8 @@ void ScopeHandler::PushScope(Scope &scope) { } // The name of a module or submodule cannot be "used" in its scope, // as we read 19.3.1(2), so we allow the name to be used as a local - // identifier in the module or submodule too. Same with programs. + // identifier in the module or submodule too. Same with programs + // (14.1(3)). if (!currScope_->IsDerivedType() && kind != Scope::Kind::Module && kind != Scope::Kind::MainProgram) { if (auto *symbol{scope.symbol()}) { @@ -2098,7 +2099,7 @@ Scope *ModuleVisitor::FindModule(const parser::Name &name, Scope *ancestor) { Say(name, "'%s' is not a module"_err_en_US); return nullptr; } - if (DoesScopeContain(scope, currScope())) { + if (DoesScopeContain(scope, currScope())) { // 14.2.2(1) Say(name, "Module '%s' cannot USE itself."_err_en_US); } Resolve(name, scope->symbol());