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

* [Bug libfortran/18653] open call should open for read-only if open for read/write fails.
  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 ` pinskia at gcc dot gnu dot org
  2004-11-24 18:18 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-24 18:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-24 18:03 -------
Confirmed, I will reopen the other bug and close it as a dup of this one.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-24 18:03:45
               date|                            |


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


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

* [Bug libfortran/18653] open call should open for read-only if open for read/write fails.
  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
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-24 18:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-24 18:18 -------
*** Bug 18297 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mimo2 at free dot fr


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


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

* [Bug libfortran/18653] open call should open for read-only if open for read/write fails.
  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
  3 siblings, 0 replies; 5+ messages in thread
From: sje at cup dot hp dot com @ 2004-12-08 16:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sje at cup dot hp dot com  2004-12-08 16:52 -------
This has been fixed with the patch
http://gcc.gnu.org/ml/fortran/2004-12/msg00017.html
which is now checked in on ToT.

-- 


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


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

* [Bug libfortran/18653] open call should open for read-only if open for read/write fails.
  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
                   ` (2 preceding siblings ...)
  2004-12-08 16:52 ` sje at cup dot hp dot com
@ 2004-12-08 16:54 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-08 16:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-08 16:54 -------
Fixed by:
2004-12-07  Steve Ellcey  <sje@cup.hp.com>

        * io/io.h (open_external): Change prototype.
        * io/unix.c (regular_file): Change prototype and set flags->action if
        needed.
        (open_external): Ditto.
        * io/open.c (new_unit): Let open_external set flags->action.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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).