Bug 231134
| Summary: | gfortan-generated code cannot handle r/o partitions. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Pawel Salek <pawsa> |
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 4.1.2-4 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2007-03-13 14:53:42 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Should be fixed in libgfortran-4.1.2-4 in rawhide. |
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