Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion flang/lib/Semantics/check-do-forall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,9 @@ void DoForallChecker::Leave(const parser::IoControlSpec &ioControlSpec) {
void DoForallChecker::Leave(const parser::OutputImpliedDo &outputImpliedDo) {
const auto &control{std::get<parser::IoImpliedDoControl>(outputImpliedDo.t)};
const parser::Name &name{control.name.thing.thing};
context_.CheckIndexVarRedefine(name.source, *name.symbol);
if (name.symbol) {
context_.CheckIndexVarRedefine(name.source, *name.symbol);
}
}

void DoForallChecker::Leave(const parser::StatVariable &statVariable) {
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/resolve-names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8700,7 +8700,7 @@ const parser::Name *DeclarationVisitor::ResolveName(const parser::Name &name) {
return &name;
}
if (isImplicitNoneType() && !deferImplicitTyping_) {
Say(name, "No explicit type declared for '%s'"_err_en_US);
Say(name, "No explicit type declared for '%s'"_err_en_US, name.source);
return nullptr;
}
// Create the symbol, then ensure that it is accessible
Expand Down
7 changes: 7 additions & 0 deletions flang/test/Semantics/resolve40.f90
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,10 @@ subroutine s12(x)
!BECAUSE: 'x' is an INTENT(IN) dummy argument
read(*,nml=nl)
end

subroutine s13()
implicit none
!ERROR: No explicit type declared for 'i'
!ERROR: No explicit type declared for 'i'
print *, (i, i = 1, 2)
end
Loading