This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix crash on empty formatted external READs
ClosedPublic

Authored by klausler on Oct 22 2021, 2:53 PM.

Details

Summary

ExternalFileUnit::BeginReadingRecord() must be called at least once
during an external formatted READ statement before FinishReadingRecord().
In the case of a formatted external READ with no data items, the call
to finish processing of the format (which might have lingering control
items that need doing) was taking place before the call to BeginReadingRecord
from ExternalIoStatementState::EndIoStatement. Add a call to
BeginReadingRecord on this path.

Diff Detail

Event Timeline

klausler created this revision.Oct 22 2021, 2:53 PM
klausler requested review of this revision.Oct 22 2021, 2:53 PM
vdonaldson accepted this revision.Oct 22 2021, 3:47 PM
This revision is now accepted and ready to land.Oct 22 2021, 3:47 PM
This revision was landed with ongoing or failed builds.Oct 22 2021, 3:52 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2021, 3:52 PM