[flang] Give explicit convert= specifiers precedence over FORT_CONVERT
authorJonathon Penix <jpenix@quicinc.com>
Fri, 2 Sep 2022 03:04:18 +0000 (20:04 -0700)
committerJonathon Penix <jpenix@quicinc.com>
Tue, 20 Sep 2022 03:40:51 +0000 (20:40 -0700)
commitbfcd536a8ef6b1d6e9dd211925be3b078d06fe77
tree59838bd773cd3c93180d72842789ff34112112e3
parent67c482e0b4be503056271e9cbdc891262b3fc904
[flang] Give explicit convert= specifiers precedence over FORT_CONVERT

Currently, the FORT_CONVERT environment variable has the highest priority when
setting the endianness conversion for unformatted files. In discussing the
appropriate priority for the fconvert option, convert specifiers were decided
to take highest priority.

This patch also initializes the open statement convert state to unknown
to disambiguate cases where the convert specifier was not provided from
cases where convert=native was set. This makes it possible to defer to the
environment setting where appropriate.

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