diff --git a/flang/runtime/unit.cpp b/flang/runtime/unit.cpp index dec8d8032f615..995656b9480c4 100644 --- a/flang/runtime/unit.cpp +++ b/flang/runtime/unit.cpp @@ -825,10 +825,6 @@ void ExternalFileUnit::BackspaceVariableUnformattedRecord( return; } frameOffsetInFile_ -= *recordLength + 2 * headerBytes; - if (frameOffsetInFile_ >= headerBytes) { - frameOffsetInFile_ -= headerBytes; - recordOffsetInFrame_ = headerBytes; - } auto need{static_cast( recordOffsetInFrame_ + sizeof header + *recordLength)}; got = ReadFrame(frameOffsetInFile_, need, handler);