[flang] Defer "next input record" processing until handlers established
authorpeter klausler <pklausler@nvidia.com>
Mon, 3 Aug 2020 18:31:13 +0000 (11:31 -0700)
committerpeter klausler <pklausler@nvidia.com>
Mon, 3 Aug 2020 23:44:37 +0000 (16:44 -0700)
commitd879ac8a6eef683392a02dd0aa62c69d61b894eb
tree56a09863a57b24e44c2d60c18f32d66fdfd75de7
parentd8334c43606a08dc13a69d0993dc7a52d5c0fe56
[flang] Defer "next input record" processing until handlers established

External input was detecting "end of file" conditions in
BeginExternal...Input() and BeginUnformattedInput() routines
before EnableHandlers() could have been called.  Defer the
"start next record" processing to the input data item
handlers (and EndIoStatement() for when there are no data
items).

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