[flang][runtime] Fix REWIND after non-advancing data transfer

A REWIND of a unit that's in the middle of a record due to a READ
or WRITE statement with ADVANCE='NO' needs to reset the left tab
limit so that the next transfer takes place at the beginning of
the first record.

Differential Revision: https://reviews.llvm.org/D127783
This commit is contained in:
Peter Klausler 2022-06-09 15:30:38 -07:00
parent c418d0f1be
commit 6963fb7dfb
1 changed files with 1 additions and 0 deletions

View File

@ -640,6 +640,7 @@ void ExternalFileUnit::Rewind(IoErrorHandler &handler) {
} else { } else {
SetPosition(0, handler); SetPosition(0, handler);
currentRecordNumber = 1; currentRecordNumber = 1;
leftTabLimit.reset();
} }
} }