Dear Sirs,
TDM gfortran seems to have a bug. Trying to OPEN an existing file leads to runtime error.
Example file:
program main
open(20,file="arr.txt", status="new")
close(20)
print*, "File 20 closed"
print*, "Trying to open File 20: leads to runtime-error."
open(20,file="arr.txt", status="old")
close(20)
end program main
Compiling and building OK.
File 20 closed
Trying to open File 20: leads to runtime-error.
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
Working enviroment:
gfortran from "codeblocks-17.12mingw_fortran-setup.exe"
gcc version 5.1.0 (tdm-1)
GNU ld (GNU Binutils) 2.24
Trying the TDM64 bundle (GCC 5.1.0) results the same error.
The same error occurs in all cases, using CodeBlocks or using gfortran from TDM bundle or CodeBlocks directly on command line.
The error occurs on more machines (i3, i7, Xeon). On all machines installed Win 10 Pro, v1909, Build 18363.657.
Regards
Geza Hidasi
Anonymous
Additional info:
using gcc version 8.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project), the above error doesn't occur.
Geza Hidasi