This is an archive of the discontinued LLVM Phabricator instance.

[flang][runtime] Keep frame buffer in sync with file when truncating
ClosedPublic

Authored by klausler on Jul 13 2022, 11:38 AM.

Details

Summary

When the I/O runtime is truncating an external file due to an
implied ENDFILE or explicit ENDFILE, ensure that the unit's frame
buffer for the file discards any data that have become obsolete.

This bug caused trouble with ACCESS='STREAM' I/O using POS= on
a WRITE, but it may have not been limited to that scenario.

Diff Detail

Event Timeline

klausler created this revision.Jul 13 2022, 11:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2022, 11:38 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Jul 13 2022, 11:38 AM
vdonaldson accepted this revision.Jul 13 2022, 2:29 PM
This revision is now accepted and ready to land.Jul 13 2022, 2:29 PM