[flang][runtime] When OPEN implies CLOSE, disable later extant unit c… (#69390)
commitccc573c6d821b010217d0621fd271c0a7972ccba
authorPeter Klausler <35819229+klausler@users.noreply.github.com>
Tue, 31 Oct 2023 17:25:29 +0000 (31 10:25 -0700)
committerGitHub <noreply@github.com>
Tue, 31 Oct 2023 17:25:29 +0000 (31 10:25 -0700)
treea87030d3f29f2fa77c099726a2cf04e65febd6ad
parent483e92468e597b73c646182bd755a0d5ef67d327
[flang][runtime] When OPEN implies CLOSE, disable later extant unit c… (#69390)

…hecks

An OPEN statement on an existing unit can imply a CLOSE of that unit;
for example, OPEN(5, FILE="mydata", FORM="formatted") should implicitly
close the standard input that had been preconnected to unit 5. When this
happens, later checks in OPEN statement completion that apply only to
existing units should be disabled.
flang/runtime/io-stmt.cpp
flang/runtime/unit.cpp
flang/runtime/unit.h