This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix regression from recent runtime input fix
ClosedPublic

Authored by klausler on Aug 16 2021, 2:08 PM.

Details

Summary

A recent runtime I/O change[1] was meant to improve the handling of
input from external files missing a terminal newline on their last
records; the change was "triggered" by the wrong circumstances and
causing reads that should have pulled more data into the buffer to be
treated as EOFs. So fix that, and also don't retain input data
in the buffer once an input record has been finished unless it's
known that list-directed or NAMELIST input of a repeated input item
may need to backspace a non-positionable external unit to return
to the beginning of the repeated item.

[1] 6578893a0453384346f149479f8574dfff977ace

Diff Detail

Event Timeline

klausler created this revision.Aug 16 2021, 2:08 PM
klausler requested review of this revision.Aug 16 2021, 2:08 PM
PeteSteinfeld accepted this revision.Aug 16 2021, 2:51 PM

All builds, tests, and looks good.

This revision is now accepted and ready to land.Aug 16 2021, 2:51 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2021, 10:13 AM