Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
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