public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/18653] New: open call should open for read-only if open for read/write fails.
@ 2004-11-24 17:46 sje at cup dot hp dot com
  2004-11-24 18:04 ` [Bug libfortran/18653] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sje at cup dot hp dot com @ 2004-11-24 17:46 UTC (permalink / raw)
  To: gcc-bugs

If we have the following program:

      OPEN(10,FILE='wup.in',STATUS='OLD')
      CLOSE(10, STATUS='KEEP')
      END

And a data file that is readable by everyone and writable by nobody:

$ ll wup.in
-r--r--r--   1 sje        other             0 Nov 24 08:43 wup.in

gfortran will fail on the open (because it tries to open for read & write),
other compilers will open for read-only if they cannot open for reading and
writing.

Opening for read-only is not required by the Fortran standard but it is how
most Fortran compilers (HP, Intel, g77) behave.

-- 
           Summary: open call should open for read-only if open for
                    read/write fails.
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sje at cup dot hp dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ia64-hp-hpux11.23
  GCC host triplet: ia64-hp-hpux11.23
GCC target triplet: ia64-hp-hpux11.23


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18653


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-08 16:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-24 17:46 [Bug libfortran/18653] New: open call should open for read-only if open for read/write fails sje at cup dot hp dot com
2004-11-24 18:04 ` [Bug libfortran/18653] " pinskia at gcc dot gnu dot org
2004-11-24 18:18 ` pinskia at gcc dot gnu dot org
2004-12-08 16:52 ` sje at cup dot hp dot com
2004-12-08 16:54 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).