hanchenye-llvm-project/flang/runtime
Jean Perier c5729f2e63 [flang] Set default form if unspecified at end of OPEN statement
The standard specifies that the form must be set to a default at the
end of an open statement (C.7.4 point 2) where it was not specified.
Only in the case of a pre-connected unit can the form be deferred
until the first data transfer statement.

Set back the default form setting in OpenStatementState::EndIoStatement
that had been removed when deferring the pre-connected unit from setting
in 199a623ebf.

Also return "UNDEFINED" instead of "UNKNOWN" to the FORM inquiry when the
form was not yet specified as defined in 12.10.2.12.

Related test: syntax 215a216.

Differential Revision: https://reviews.llvm.org/D108990
2021-09-01 08:40:43 +02:00
..
CMakeLists.txt [flang] Implement runtime Assign() 2021-08-09 09:31:32 -07:00
ISO_Fortran_binding.cpp [flang] Add clang-tidy check for braces around if 2021-06-16 09:13:53 +00:00
allocatable.cpp [flang] Implement runtime Assign() 2021-08-09 09:31:32 -07:00
allocatable.h [flang] Implement runtime Assign() 2021-08-09 09:31:32 -07:00
assign.cpp [flang] Implement runtime Assign() 2021-08-09 09:31:32 -07:00
assign.h [flang] Implement runtime Assign() 2021-08-09 09:31:32 -07:00
buffer.cpp
buffer.h
c-or-cpp.h
character.cpp [flang] Correct the subscripts used for arguments to character intrinsics 2021-06-16 10:26:25 -07:00
character.h
command.h [flang] Add runtime interface for GET_COMMAND_ARGUMENT 2021-08-30 07:31:13 +00:00
complex-reduction.c [flang] Implement DOT_PRODUCT in the runtime 2021-05-13 10:40:07 -07:00
complex-reduction.h [flang] Implement DOT_PRODUCT in the runtime 2021-05-13 10:40:07 -07:00
config.h.cmake
connection.cpp [flang] Implement NAMELIST I/O in the runtime 2021-05-06 11:18:36 -07:00
connection.h [flang] Fix regression from recent runtime input fix 2021-08-17 10:12:56 -07:00
copy.cpp [flang] Runtime implementation for default derived type formatted I/O 2021-06-18 10:30:28 -07:00
copy.h [flang] Implement more transformational intrinsic functions in runtime 2021-05-20 13:22:01 -07:00
cpp-type.h
derived-api.cpp [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -07:00
derived-api.h [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -07:00
derived.cpp [flang] Implement runtime Assign() 2021-08-09 09:31:32 -07:00
derived.h [flang] Implement runtime Assign() 2021-08-09 09:31:32 -07:00
descriptor-io.cpp [flang] Fix legitimate warning from latest GCC 2021-07-20 11:40:34 -07:00
descriptor-io.h [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -07:00
descriptor.cpp [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -07:00
descriptor.h [flang] Remove now-unused private data member, silence warning 2021-07-20 17:24:39 -07:00
dot-product.cpp [flang] Implement MATMUL in the runtime 2021-05-18 10:59:52 -07:00
edit-input.cpp [flang] runtime: fix problems with I/O around EOF & delimited characters 2021-07-23 18:23:26 -07:00
edit-input.h
edit-output.cpp [flang] runtime: For Fw.d formatting, don't oscillate forever 2021-08-04 12:19:23 -07:00
edit-output.h
entry-names.h
environment.cpp
environment.h
extrema.cpp [flang] Implement NORM2 in the runtime 2021-05-07 13:23:21 -07:00
file.cpp [flang][msvc] Fix external-io unittest. 2021-07-26 15:34:35 -05:00
file.h
findloc.cpp
format-implementation.h [flang] Fix "non-advancing" I/O, support $ in FORMAT 2021-06-28 12:18:25 -07:00
format.cpp [flang] Implement user-defined derived type runtime I/O 2021-06-28 11:36:19 -07:00
format.h [flang] Fix "non-advancing" I/O, support $ in FORMAT 2021-06-28 12:18:25 -07:00
internal-unit.cpp
internal-unit.h
io-api.cpp [flang] Fix "non-advancing" I/O, support $ in FORMAT 2021-06-28 12:18:25 -07:00
io-api.h [flang] Implement NAMELIST I/O in the runtime 2021-05-06 11:18:36 -07:00
io-error.cpp [flang] Implement user-defined derived type runtime I/O 2021-06-28 11:36:19 -07:00
io-error.h [flang] Implement user-defined derived type runtime I/O 2021-06-28 11:36:19 -07:00
io-stmt.cpp [flang] Set default form if unspecified at end of OPEN statement 2021-09-01 08:40:43 +02:00
io-stmt.h [flang] Fix regression from recent runtime input fix 2021-08-17 10:12:56 -07:00
iostat.cpp
iostat.h
lock.h
magic-numbers.h
main.cpp
main.h
matmul.cpp [flang] Implement MATMUL in the runtime 2021-05-18 10:59:52 -07:00
matmul.h [flang] Implement MATMUL in the runtime 2021-05-18 10:59:52 -07:00
memory.cpp
memory.h
misc-intrinsic.cpp [flang] Runtime API for data pointers 2021-07-19 08:23:06 -07:00
misc-intrinsic.h
namelist.cpp [flang] Add missing call to BeginReadingRecord() 2021-08-17 11:10:25 -07:00
namelist.h [flang] Implement NAMELIST I/O in the runtime 2021-05-06 11:18:36 -07:00
numeric.cpp [flang] Correct off-by-one error in SET_EXPONENT 2021-08-12 12:50:16 -07:00
numeric.h
pgmath.h.inc
pointer.cpp [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -07:00
pointer.h [flang] Runtime API for data pointers 2021-07-19 08:23:06 -07:00
product.cpp
random.cpp [flang] Fixed simple typo in runtime code 2021-06-10 11:14:25 -06:00
random.h
reduction-templates.h Fix runtime internal error with certain intrinsics that can take a scalar 2021-07-29 13:08:41 -07:00
reduction.cpp Fix runtime internal error with certain intrinsics that can take a scalar 2021-07-29 13:08:41 -07:00
reduction.h [flang] Fix two typos in API names 2021-08-11 12:43:37 -07:00
stat.cpp
stat.h
stop.cpp
stop.h
sum.cpp [flang] Use a "double-double" accumulator in SUM 2021-06-16 14:29:39 -07:00
terminator.cpp
terminator.h
time-intrinsic.cpp [flang] Implement Posix version of DATE_AND_TIME runtime 2021-08-25 11:16:52 +02:00
time-intrinsic.h [flang] Implement Posix version of DATE_AND_TIME runtime 2021-08-25 11:16:52 +02:00
tools.cpp [flang] Implement user-defined derived type runtime I/O 2021-06-28 11:36:19 -07:00
tools.h [flang] Runtime implementation for default derived type formatted I/O 2021-06-18 10:30:28 -07:00
transformational.cpp [flang] Fix the vector version of EOSHIFT with a BOUNDARY argument 2021-08-17 15:20:15 -07:00
transformational.h Change the flang reshape runtime routine interface to use a result 2021-06-24 17:05:12 -07:00
type-code.cpp
type-code.h
type-info.cpp [flang] Implement runtime Assign() 2021-08-09 09:31:32 -07:00
type-info.h [flang] Silence new build warning 2021-08-09 11:57:45 -07:00
unit-map.cpp [flang] Fix "non-advancing" I/O, support $ in FORMAT 2021-06-28 12:18:25 -07:00
unit-map.h
unit.cpp [flang] runtime: fix WRITE after BACKSPACE on variable-length file 2021-08-24 09:34:52 -07:00
unit.h [flang] Fix "non-advancing" I/O, support $ in FORMAT 2021-06-28 12:18:25 -07:00