[flang-commits] [PATCH] D114755: [flang] Correct INQUIRE(POSITION= & PAD=)

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Nov 29 15:38:15 PST 2021


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.

INQUIRE(POSITION=)'s results need to reflect the POSITION=
specifier used for the OPEN statement until the unit has been
repositioned.  Preserve the POSITION= from OPEN and used it
for INQUIRE(POSITION=) until is becomes obsolete.

INQUIRE(PAD=) is implemented here in the case of an unconnected unit
with Fortran 2018 semantics; i.e., "UNDEFINED", rather than Fortran 90's
"YES"/"NO" (see 4.3.6 para 2).  Apparent failures with F'90-only tests
will persist with INQUIRE(PAD=); these discrepancies don't seem to warrant
an option or environment variable.

To make the implementation of INQUIRE more closely match the language
in the standard, rename IsOpen() to IsConnected(), and use it explicitly
for the various INQUIRE specifiers.


https://reviews.llvm.org/D114755

Files:
  flang/runtime/connection.h
  flang/runtime/file.cpp
  flang/runtime/file.h
  flang/runtime/io-stmt.cpp
  flang/runtime/unit.cpp
  flang/runtime/unit.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114755.390505.patch
Type: text/x-patch
Size: 13071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211129/deebb6b7/attachment.bin>


More information about the flang-commits mailing list