llvm/flang/runtime
Michael Kruse cbad57613e [flang][msvc] Fix external-io unittest.
Fix the external-io unittest under Windows.

In particular, fixes the following issues:

 1.  When creating a temporary file, open it with read+write permissions
     using the _O_RDWR flag. _S_IREAD and _S_IWRITE are for the file
     permissions of the created file.

 2. _chsize returns 0 on success (just like ftruncate).

 3. To set a std::optional, use its assign-operator overload instead of
    getting a reference to its value and overwrite that. The latter is
    invalid if the std::optional has no value, and is caught by
    msvc's debug STL.

The non-GTest unittest is currently not executed under Windows because
of the added .exe extension to the output file: external-io.text.exe.
llvm-lit skips the file because .exe is not in the lists of test
suffixes (.test is). D105315 is going to change that by converting it
to a GTest-test.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D106726
2021-07-26 15:34:35 -05:00
..
allocatable.cpp [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -07:00
allocatable.h [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -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
CMakeLists.txt [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -07: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 "non-advancing" I/O, support $ in FORMAT 2021-06-28 12:18:25 -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] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -07:00
derived.h [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -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: fix problems with I/O around EOF & delimited characters 2021-07-23 18:23:26 -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] Fix "non-advancing" I/O, support $ in FORMAT 2021-06-28 12:18:25 -07:00
io-stmt.h [flang] Runtime: Reset list-directed input state for each NAMELIST item 2021-07-23 18:21:33 -07:00
iostat.cpp
iostat.h
ISO_Fortran_binding.cpp [flang] Add clang-tidy check for braces around if 2021-06-16 09:13:53 +00:00
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] Runtime: Reset list-directed input state for each NAMELIST item 2021-07-23 18:21:33 -07:00
namelist.h [flang] Implement NAMELIST I/O in the runtime 2021-05-06 11:18:36 -07:00
numeric.cpp
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
reduction.cpp [flang] Implement runtime for IALL & IANY 2021-06-16 14:54:36 -07:00
reduction.h [flang] Implement runtime for IALL & IANY 2021-06-16 14:54:36 -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 [flang] Fix race condition in runtime 2021-05-06 11:09:30 -07:00
terminator.h
time-intrinsic.cpp [flang] Add POSIX implementation for CPU_TIME 2021-06-14 09:41:11 +00:00
time-intrinsic.h [flang] Add runtime interface for SYSTEM_CLOCK 2021-06-29 08:25:01 +00: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] Implement the runtime portion of the CSHIFT intrinsic 2021-07-21 13:39:21 -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] Two tweaks to mollify buildbots 2021-07-20 19:42:05 -07:00
type-info.h [flang] Run-time derived type initialization and destruction 2021-07-20 15:24:16 -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][msvc] Fix external-io unittest. 2021-07-26 15:34:35 -05:00
unit.h [flang] Fix "non-advancing" I/O, support $ in FORMAT 2021-06-28 12:18:25 -07:00