| Issue |
183356
|
| Summary |
[flang-rt][windows] opening files in append mode doesn't append
|
| Labels |
flang:runtime,
platform:windows,
flang-rt
|
| Assignees |
|
| Reporter |
DavidTruby
|
Given the following code, flang on Linux and gfortran on Windows correctly create a file with both numbers in it, and put both numbers at the end of an already existing out.txt if run again. Flang on Windows (both x86_64 and aarch64) always overwrite the file, and it always contains only a single `1`. So for some reason not only is the file not being appended to when opened for the first time, the first write is the only one which actually occurs.
```fortran
open(unit=1, file='out.txt', position='append')
write (1,*) 1
close(1)
open(unit=1, file='out.txt', position='append')
write (1,*) 2
close(1)
end program
```
The same happens if you use `access='append'`. I assume this is a bug in the runtime on Windows, rather than being a compiler-level bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs