[all-commits] [llvm/llvm-project] d77124: [flang] Fix READ/WRITE with POS= on stream units, ...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Thu Jun 23 09:17:10 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d771245a9dd81c374e7ff34581a2f7adaf74fc38
https://github.com/llvm/llvm-project/commit/d771245a9dd81c374e7ff34581a2f7adaf74fc38
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2022-06-23 (Thu, 23 Jun 2022)
Changed paths:
M flang/runtime/io-api.cpp
M flang/runtime/unit.cpp
M flang/runtime/unit.h
Log Message:
-----------
[flang] Fix READ/WRITE with POS= on stream units, with refactoring
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.
Differential Revision: https://reviews.llvm.org/D128388
More information about the All-commits
mailing list