[flang][runtime] EOF is recoverable only with END= or IOSTAT=
authorPeter Klausler <pklausler@nvidia.com>
Thu, 9 Mar 2023 00:09:01 +0000 (16:09 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Fri, 10 Mar 2023 18:35:18 +0000 (10:35 -0800)
commit0a8a572c7ebc027a4e21b3f0073565b0ea2d00c6
tree803f27b7571925c06326003984378fc8bbf9557b
parentd84e971f48bc2ebab11bd01dd6bb9e8441419dcb
[flang][runtime] EOF is recoverable only with END= or IOSTAT=

The runtime's I/O error handler was not crashing the program on an
end-of-file condition that arises for a data transfer statement with
at least one of ERR= or IOMSG= and none of END= or IOSTAT= control
items.  This turns out to be incorrect (per subclause 12.11);
an EOF is recoverable only for END= and/or IOSTAT=, and an
non-advancing end-of-record is recoverable only for EOR= and/or IOSTAT=.

Differential Revision: https://reviews.llvm.org/D145754
flang/runtime/io-error.cpp