[flang-commits] [PATCH] D119015: [flang] Debugging of ACCESS='STREAM' I/O (take 2)

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Feb 4 09:43:48 PST 2022


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

Corrects the runtime implementation of I/O on files with
the access mode ACCESS='STREAM'.  This is a collection
of edge-case tweaks to ensure that the distinctions between
stream and direct/sequential files, unformatted or formatted,
are respected where appropriate.

Moves NextInField() from io-stmt.h to io-stmt.cpp --
it was getting too big to keep in a header.

The original version of this patch exposed a problem with
the I/O runtime on Windows and it was reverted.  This new
version also fixes that problem; files are now opened on Windows
in binary mode to prevent inadvertent insertions of
carriage returns before line feeds, and those line
endings (CR+LF) are now explicitly generated.


https://reviews.llvm.org/D119015

Files:
  flang/include/flang/Runtime/iostat.h
  flang/runtime/connection.h
  flang/runtime/edit-input.cpp
  flang/runtime/file.cpp
  flang/runtime/file.h
  flang/runtime/io-api.cpp
  flang/runtime/io-stmt.cpp
  flang/runtime/io-stmt.h
  flang/runtime/iostat.cpp
  flang/runtime/unit.cpp
  flang/runtime/unit.h
  flang/unittests/Runtime/ExternalIOTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119015.406009.patch
Type: text/x-patch
Size: 30781 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220204/692134a1/attachment-0001.bin>


More information about the flang-commits mailing list