llvm-project/flang/runtime
Peter Klausler 80cdf0db67 [flang] Correct INQUIRE(POSITION= & PAD=)
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.

Differential Revision: https://reviews.llvm.org/D114755
2021-11-30 13:51:48 -08:00
..
CMakeLists.txt [flang] Revert 3 commits pushed by mistake along b7c07ce15f 2021-10-01 09:01:31 +02:00
ISO_Fortran_binding.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
allocatable.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
assign.cpp [flang] Make subscript list argument a nullable pointer 2021-11-08 11:53:13 -08:00
buffer.cpp [flang] Remove *- C++ -* incantation from runtime .cpp files. NFC 2021-09-03 07:17:45 +00:00
buffer.h [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
character.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
command.cpp [flang] Implement GET_ENVIRONMENT_VARIABLE(VALUE) 2021-11-01 09:19:20 +00:00
complex-reduction.c [flang] Change complex type define in runtime for clang-cl 2021-09-22 06:54:33 +00:00
complex-reduction.h [flang] Change complex type define in runtime for clang-cl 2021-09-22 06:54:33 +00:00
config.h.cmake [flang] Support platforms without strerror_r 2020-03-28 16:46:43 -05:00
connection.cpp [flang] Complete the fix for NAMELIST look-ahead case 2021-11-08 10:01:16 -08:00
connection.h [flang] Correct INQUIRE(POSITION= & PAD=) 2021-11-30 13:51:48 -08:00
copy.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
copy.h [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
derived-api.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
derived.cpp [flang][NFC] Document behavior for nonspecified/ambiguous cases 2021-10-11 11:06:07 -07:00
derived.h [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
descriptor-io.cpp [flang] Fix legitimate warning from latest GCC 2021-07-20 11:40:34 -07:00
descriptor-io.h [flang] Make subscript list argument a nullable pointer 2021-11-08 11:53:13 -08:00
descriptor.cpp [flang] Runtime performance improvements to real formatted input 2021-11-12 11:40:02 -08:00
dot-product.cpp [flang] Fix DOT_PRODUCT for logical 2021-10-22 15:56:20 -07:00
edit-input.cpp [flang] Remove typo that affected complex namelist input 2021-11-22 15:06:46 -08:00
edit-input.h [flang][msvc] Avoid dependence on long double 2020-10-07 15:12:08 -07:00
edit-output.cpp [flang] Fix rounding edge case in F output editing 2021-11-12 11:16:25 -08:00
edit-output.h [flang] Fix rounding edge case in F output editing 2021-11-12 11:16:25 -08:00
environment.cpp [flang] Respect NO_STOP_MESSAGE=1 in runtime 2021-11-12 10:50:36 -08:00
environment.h [flang] Respect NO_STOP_MESSAGE=1 in runtime 2021-11-12 10:50:36 -08:00
extrema.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
file.cpp [flang] Correct INQUIRE(POSITION= & PAD=) 2021-11-30 13:51:48 -08:00
file.h [flang] Correct INQUIRE(POSITION= & PAD=) 2021-11-30 13:51:48 -08:00
findloc.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
format-implementation.h [flang] Extension: allow tabs in output format strings 2021-10-22 15:53:29 -07:00
format.cpp [flang] Remove *- C++ -* incantation from runtime .cpp files. NFC 2021-09-03 07:17:45 +00:00
format.h [flang] Support NAMELIST input of short arrays 2021-10-22 13:38:11 -07:00
internal-unit.cpp [flang] Runtime performance improvements to real formatted input 2021-11-12 11:40:02 -08:00
internal-unit.h [flang] Runtime performance improvements to real formatted input 2021-11-12 11:40:02 -08:00
io-api.cpp [flang] Emit unformatted headers & footers even with RECL= 2021-10-22 11:07:01 -07:00
io-error.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
io-error.h [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
io-stmt.cpp [flang] Correct INQUIRE(POSITION= & PAD=) 2021-11-30 13:51:48 -08:00
io-stmt.h [flang] Runtime performance improvements to real formatted input 2021-11-12 11:40:02 -08:00
iostat.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
lock.h [flang] More Fortran runtime support for CHARACTER operations 2020-06-17 15:51:48 -07:00
main.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
matmul.cpp [flang] Speed common runtime cases of DOT_PRODUCT & MATMUL 2021-10-22 14:36:13 -07:00
memory.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
misc-intrinsic.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
namelist.cpp [flang] Make subscript list argument a nullable pointer 2021-11-08 11:53:13 -08:00
namelist.h [flang] Support NAMELIST input of short arrays 2021-10-22 13:38:11 -07:00
numeric.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
pointer.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
product.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
random.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
reduction-templates.h [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
reduction.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
stat.cpp [flang] Implement GET_ENVIRONMENT_VARIABLE(VALUE) 2021-11-01 09:19:20 +00:00
stat.h [flang] Implement GET_ENVIRONMENT_VARIABLE(VALUE) 2021-11-01 09:19:20 +00:00
stop.cpp [flang] Skip `Fortran STOP:` before message when NO_STOP_MESSAGE is set 2021-11-18 18:08:06 +01:00
sum.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
terminator.cpp [flang] Remove *- C++ -* incantation from runtime .cpp files. NFC 2021-09-03 07:17:45 +00:00
terminator.h [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
time-intrinsic.cpp [flang] More work on SYSTEM_CLOCK runtime API and implementation 2021-10-12 09:24:24 -07:00
tools.cpp [flang] runtime: Read environment variables directly 2021-10-28 07:49:30 +00:00
tools.h [flang] Speed common runtime cases of DOT_PRODUCT & MATMUL 2021-10-22 14:36:13 -07:00
transformational.cpp [flang] Fix reversed comparison in RESHAPE() runtime 2021-11-26 12:34:00 -08:00
type-code.cpp [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
type-info.cpp [flang] Make subscript list argument a nullable pointer 2021-11-08 11:53:13 -08:00
type-info.h [flang] Make subscript list argument a nullable pointer 2021-11-08 11:53:13 -08:00
unit-map.cpp [flang] Remove *- C++ -* incantation from runtime .cpp files. NFC 2021-09-03 07:17:45 +00:00
unit-map.h [flang] Move runtime API headers to flang/include/flang/Runtime 2021-09-03 11:08:34 -07:00
unit.cpp [flang] Correct INQUIRE(POSITION= & PAD=) 2021-11-30 13:51:48 -08:00
unit.h [flang] Correct INQUIRE(POSITION= & PAD=) 2021-11-30 13:51:48 -08:00