From 78547871c3a7a9abde35a23c9406cec7d11f5552 Mon Sep 17 00:00:00 2001 From: Andre Kuhlenschmidt Date: Wed, 3 Sep 2025 12:53:00 -0700 Subject: [PATCH 1/2] initial commit --- flang-rt/lib/runtime/io-stmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang-rt/lib/runtime/io-stmt.cpp b/flang-rt/lib/runtime/io-stmt.cpp index 3260c8f83edb9..be641f6d2a531 100644 --- a/flang-rt/lib/runtime/io-stmt.cpp +++ b/flang-rt/lib/runtime/io-stmt.cpp @@ -1109,7 +1109,7 @@ template bool ChildListIoStatementState::AdvanceRecord(int n) { #if !defined(RT_DEVICE_AVOID_RECURSION) // Allow child NAMELIST input to advance - if (DIR == Direction::Input && this->mutableModes().inNamelist) { + if constexpr (DIR == Direction::Input) { return this->child().parent().AdvanceRecord(n); } else { return false; From b7c6a0e6b3aef802270649d194f3ea357c3333ed Mon Sep 17 00:00:00 2001 From: Andre Kuhlenschmidt Date: Thu, 4 Sep 2025 09:10:42 -0700 Subject: [PATCH 2/2] address feedback --- flang-rt/lib/runtime/io-stmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang-rt/lib/runtime/io-stmt.cpp b/flang-rt/lib/runtime/io-stmt.cpp index be641f6d2a531..58fcd2377f563 100644 --- a/flang-rt/lib/runtime/io-stmt.cpp +++ b/flang-rt/lib/runtime/io-stmt.cpp @@ -1108,7 +1108,7 @@ ChildListIoStatementState::ChildListIoStatementState( template bool ChildListIoStatementState::AdvanceRecord(int n) { #if !defined(RT_DEVICE_AVOID_RECURSION) - // Allow child NAMELIST input to advance + // Allow child list directed input to advance if constexpr (DIR == Direction::Input) { return this->child().parent().AdvanceRecord(n); } else {