This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/18297] gfortran : file opening fails if only read access
- From: "mimo2 at free dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Nov 2004 09:15:46 -0000
- Subject: [Bug libfortran/18297] gfortran : file opening fails if only read access
- References: <20041104154612.18297.mimo2@free.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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