[flang][runtime] Don't crash after reporting I/O statement errors
authorPeter Klausler <pklausler@nvidia.com>
Mon, 6 Jun 2022 22:59:01 +0000 (15:59 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 13 Jun 2022 18:24:59 +0000 (11:24 -0700)
commit2a07db4cf60f961ae05b9febf8bcd2948ace93e3
treecad26a782eb4fa80c9a57bec30c7d6826f4d95fc
parente7766972a6790e25dbb4ce3481f57e9792b49269
[flang][runtime] Don't crash after reporting I/O statement errors

When an I/O statement is known to be in a recoverable error state,
it shouldn't cause a crash later in execution because it's not in
an expected non-erroneous processing state.  Add checking for the
ErroneousIoStatementState variant on paths that might otherwise
lead to runtime crashes.

Differential Revision: https://reviews.llvm.org/D127423
flang/runtime/io-api.cpp
flang/runtime/io-stmt.h