diff --git a/flang-rt/include/flang-rt/runtime/io-stmt.h b/flang-rt/include/flang-rt/runtime/io-stmt.h index 95b2ee7370981..1d680d7d2ffb3 100644 --- a/flang-rt/include/flang-rt/runtime/io-stmt.h +++ b/flang-rt/include/flang-rt/runtime/io-stmt.h @@ -856,7 +856,7 @@ class InquireUnconnectedFileState : public NoUnitIoStatementState { }; class InquireIOLengthState : public NoUnitIoStatementState, - public IoDirectionState { + public OutputStatementState { public: RT_API_ATTRS InquireIOLengthState( const char *sourceFile = nullptr, int sourceLine = 0); diff --git a/flang-rt/lib/runtime/unit.h b/flang-rt/lib/runtime/unit.h index 9aec9b1659576..f266a486bb708 100644 --- a/flang-rt/lib/runtime/unit.h +++ b/flang-rt/lib/runtime/unit.h @@ -161,9 +161,6 @@ class ExternalFileUnit : public ConnectionState, lock_.Take(); #endif A &state{u_.emplace(std::forward(xs)...)}; - if constexpr (!std::is_same_v) { - state.mutableModes() = ConnectionState::modes; - } directAccessRecWasSet_ = false; io_.emplace(state); return *io_;