This is an archive of the discontinued LLVM Phabricator instance.

[flang] Allow data transfer stmt control list errors to be caught
ClosedPublic

Authored by klausler on Mar 1 2022, 9:55 AM.

Details

Summary

The runtime crashes on several fundamental I/O data transfer statement
control list errors, like list I/O on a direct-access unit, or
input from a write-only unit, &c. These errors should not be fatal
when ERR= or IOSTAT= are present.

This patch creates a new ErroneousIoStatementState class and
uses it for the state of an I/O statement that is doomed to fail
from these errors. If there is no ERR= label or IOSTAT= variable,
the error will be raised at the end of the statement. Data transfer
operations along the way will be no-op failures.

Diff Detail

Event Timeline

klausler created this revision.Mar 1 2022, 9:55 AM
klausler requested review of this revision.Mar 1 2022, 9:55 AM
vdonaldson accepted this revision.Mar 1 2022, 11:48 AM
This revision is now accepted and ready to land.Mar 1 2022, 11:48 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 1 2022, 2:39 PM