Description of problem: Version-Release number of selected component (if applicable): gcc-gfortran-4.1.1-51.fc6 How reproducible: Always Steps to Reproduce: 1. Compile following program with gfortran: program a open(10,file='aaa',err=10, & status='old') close(10) print *, "opening succeeded" goto 20 10 print *, "opening failed" 20 continue end 2. touch aaa; sudo -s mount -oremount,ro /home 3. Run the compiled program Actual results: The program will fail to open the file. Expected results: The program should open the file in the read-only mode. Additional info: This feature worked with with g77. Following straces may be interesting: g77-compiled code: access("aaa", F_OK) = 0 open("aaa", O_RDWR|O_LARGEFILE) = -1 EROFS (Read-only file system) open("aaa", O_RDONLY|O_LARGEFILE) = 3 gfortran-compiled code on r/o file on r/w partition: open("afile", O_RDWR|O_LARGEFILE) = -1 EACCES (Permission denied) open("afile", O_RDONLY|O_LARGEFILE) = 3 gfotran-compiled code on r/o partition: open("aaa", O_RDWR|O_LARGEFILE) = -1 EROFS (Read-only file system) write(1, " opening failed", 15 opening failed) = 15
Should be fixed in libgfortran-4.1.2-4 in rawhide.