Skip to content

Commit fc450bc

Browse files
Actual fix
1 parent 270cdfc commit fc450bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flang/lib/Semantics/check-do-forall.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,9 @@ void DoForallChecker::Leave(const parser::IoControlSpec &ioControlSpec) {
11801180
void DoForallChecker::Leave(const parser::OutputImpliedDo &outputImpliedDo) {
11811181
const auto &control{std::get<parser::IoImpliedDoControl>(outputImpliedDo.t)};
11821182
const parser::Name &name{control.name.thing.thing};
1183-
context_.CheckIndexVarRedefine(name.source, *name.symbol);
1183+
if (name.symbol) {
1184+
context_.CheckIndexVarRedefine(name.source, *name.symbol);
1185+
}
11841186
}
11851187

11861188
void DoForallChecker::Leave(const parser::StatVariable &statVariable) {

0 commit comments

Comments
 (0)