diff options
Diffstat (limited to 'flang-rt/lib/runtime/io-stmt.cpp')
| -rw-r--r-- | flang-rt/lib/runtime/io-stmt.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/flang-rt/lib/runtime/io-stmt.cpp b/flang-rt/lib/runtime/io-stmt.cpp index b958f23..a88fbe6 100644 --- a/flang-rt/lib/runtime/io-stmt.cpp +++ b/flang-rt/lib/runtime/io-stmt.cpp @@ -1109,20 +1109,20 @@ ChildListIoStatementState<DIR>::ChildListIoStatementState( ChildIo &child, const char *sourceFile, int sourceLine) : ChildIoStatementState<DIR>{child, sourceFile, sourceLine} { #if !defined(RT_DEVICE_AVOID_RECURSION) - if constexpr (DIR == Direction::Input) { - if (const auto *listInput{child.parent() - .get_if<ListDirectedStatementState<Direction::Input>>()}) { - this->set_eatComma(listInput->eatComma()); - this->namelistGroup_ = listInput->namelistGroup(); - if (auto *childListInput{child.parent() - .get_if<ChildListIoStatementState<Direction::Input>>()}) { - // Child list input whose parent is child list input: can advance - // if the parent can. - this->canAdvance_ = childListInput->CanAdvance(); - } else { - // Child list input of top-level list input: can advance. - this->canAdvance_ = true; - } + if (const auto *listParent{ + child.parent().get_if<ListDirectedStatementState<DIR>>()}) { + if constexpr (DIR == Direction::Input) { + this->set_eatComma(listParent->eatComma()); + this->namelistGroup_ = listParent->namelistGroup(); + } + if (auto *childListParent{ + child.parent().get_if<ChildListIoStatementState<DIR>>()}) { + // Child list I/O whose parent is child list I/O: can advance + // if the parent can. + this->canAdvance_ = childListParent->CanAdvance(); + } else { + // Child list I/O of top-level list I/O: can advance. + this->canAdvance_ = true; } } #else |
