[Bug libfortran/18297] gfortran : file opening fails if only read access
mimo2 at free dot fr
gcc-bugzilla@gcc.gnu.org
Fri Nov 5 09:15:00 GMT 2004
------- Additional Comments From mimo2 at free dot fr 2004-11-05 09:15 -------
I don't know what is the "true" fortran convention, but this code
program test
open(unit=10,file='test.txt',status='old')
write(*,*) ' file is read'
end
works on g77 (and all the other compilers I've used) even when the
file test.txt is in readonly access. And you would then break backward
compatibility with g77 !!
I think we should have this "Fortran runtime error: Permission denied" only
if we try to write on the file, not at the opening (and subsequent reading).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18297
More information about the Gcc-bugs
mailing list