This is an archive of the discontinued LLVM Phabricator instance.

[flang][runtime] Fix WRITE after OPEN(.., POSITION="APPEND")
ClosedPublic

Authored by klausler on Jun 3 2022, 4:07 PM.

Details

Summary

The initial size of the file was not being captured as the file position
on which the first output buffer should be framed.

Diff Detail

Event Timeline

klausler created this revision.Jun 3 2022, 4:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2022, 4:07 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Jun 3 2022, 4:07 PM
vdonaldson added inline comments.Jun 3 2022, 5:26 PM
flang/runtime/unit.cpp
140

I don't see any other uses of IostatOpenBadAppend. Should this value be deleted?

klausler updated this revision to Diff 434219.Jun 3 2022, 5:50 PM
klausler retitled this revision from [flang][runtime] Fix WRITE after OPEN(.., ACCESS="APPEND") to [flang][runtime] Fix WRITE after OPEN(.., POSITION="APPEND").

Restore use of IostatOpenBadAppend error code instead of generic I/O error on a bad OPEN(POSITION='APPEND').

vdonaldson accepted this revision.Jun 3 2022, 5:58 PM
This revision is now accepted and ready to land.Jun 3 2022, 5:58 PM