[flang-commits] [PATCH] D128388: [flang] Fix READ/WRITE with POS= on stream units, with refactoring

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Jun 22 15:34:03 PDT 2022


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
klausler requested review of this revision.

First, ExternalFileUnit::SetPosition was being used both as a utility
within the class' member functions as well as an API from I/O statement
processing.  Make it private, and add APIs for SetStreamPos and SetDirectRec.

Second, ensure that SetStreamPos for POS= positioning in a stream
doesn't leave the current record number and endfile record number
in an arbitrary state.  In stream I/O they are used only to manage
end-of-file detection, and shouldn't produce false positive results
from IsAtEnd() after repositioning.


https://reviews.llvm.org/D128388

Files:
  flang/runtime/io-api.cpp
  flang/runtime/unit.cpp
  flang/runtime/unit.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128388.439185.patch
Type: text/x-patch
Size: 4583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220622/f17acf99/attachment-0001.bin>


More information about the flang-commits mailing list