[flang] Modify right modes for READ/WRITE vs OPEN
authorPeter Klausler <pklausler@nvidia.com>
Mon, 31 Jan 2022 18:06:40 +0000 (10:06 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Wed, 2 Feb 2022 21:47:46 +0000 (13:47 -0800)
commit2b0b9b2e836fffa920598ddcde326c2446127c42
tree6ea09803fd10a5154f969a728a8e3d5f7055e2a8
parent1d679097da9deba627fa2bbfc96d5657495056df
[flang] Modify right modes for READ/WRITE vs OPEN

When a mode flag is modified (e.g., BLANK='ZERO') in an I/O data transfer
statement, ensure that the right set of mode flags is modified.
There's one set of mode flags that are captured by an OPEN
statement and maintained in the connection, and another that
is maintained in an I/O statement state record for local mutability.
Some I/O API routines were unconditionally modifying the persistent
set of flags.

Differential Revision: https://reviews.llvm.org/D118835
flang/runtime/io-api.cpp