[flang] Runtime must defer formatted/unformatted determination
authorpeter klausler <pklausler@nvidia.com>
Wed, 5 May 2021 18:33:00 +0000 (11:33 -0700)
committerpeter klausler <pklausler@nvidia.com>
Thu, 6 May 2021 18:06:43 +0000 (11:06 -0700)
commit199a623ebf808a01e920ebd9904c99e633c33a1f
treec9cf2c43021f47d373ef13430394359033d1cebe
parent642df18f1437b1fffea2343fa471aebfff128c6e
[flang] Runtime must defer formatted/unformatted determination

What the Fortran standard calls "preconnected" external I/O units
might not be known to be connected to unformatted or formatted files
until the first I/O data transfer statement is executed.
Support this deferred determination by representing the flag as
a tri-state Boolean and adapting its points of use.

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