public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18297] New: gfortran : file opening fails if only read access
@ 2004-11-04 15:46 mimo2 at free dot fr
  2004-11-04 15:51 ` [Bug libfortran/18297] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: mimo2 at free dot fr @ 2004-11-04 15:46 UTC (permalink / raw)
  To: gcc-bugs

using a gfortran build as of today (but this was true also for older versions)
open(unit=xx, file=filename, status='old') crashes on linux with
Fortran runtime error: Permission denied
when we only have read access to the file filename (but works if write access)

-- 
           Summary: gfortran : file opening fails if only read access
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mimo2 at free dot fr
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug libfortran/18297] gfortran : file opening fails if only read access
  2004-11-04 15:46 [Bug fortran/18297] New: gfortran : file opening fails if only read access mimo2 at free dot fr
@ 2004-11-04 15:51 ` pinskia at gcc dot gnu dot org
  2004-11-04 17:36 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-04 15:51 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|fortran                     |libfortran
            Version|unknown                     |4.0.0


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


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

* [Bug libfortran/18297] gfortran : file opening fails if only read access
  2004-11-04 15:46 [Bug fortran/18297] New: gfortran : file opening fails if only read access mimo2 at free dot fr
  2004-11-04 15:51 ` [Bug libfortran/18297] " pinskia at gcc dot gnu dot org
@ 2004-11-04 17:36 ` pinskia at gcc dot gnu dot org
  2004-11-04 23:21 ` bdavis at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-04 17:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-04 17:36 -------
Do you have a simple example/testcase?

-- 


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


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

* [Bug libfortran/18297] gfortran : file opening fails if only read access
  2004-11-04 15:46 [Bug fortran/18297] New: gfortran : file opening fails if only read access mimo2 at free dot fr
  2004-11-04 15:51 ` [Bug libfortran/18297] " pinskia at gcc dot gnu dot org
  2004-11-04 17:36 ` pinskia at gcc dot gnu dot org
@ 2004-11-04 23:21 ` bdavis at gcc dot gnu dot org
  2004-11-05  1:29 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-11-04 23:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2004-11-04 23:21 -------
gfortran runtime does not know that you only intend to write to the file.  you
need to add ACCESS='READ' to the open statement.  With ACCESS set to read, a
read only file can be opened.

i do not think this is a bug.  

--bud davis

-- 


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


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

* [Bug libfortran/18297] gfortran : file opening fails if only read access
  2004-11-04 15:46 [Bug fortran/18297] New: gfortran : file opening fails if only read access mimo2 at free dot fr
                   ` (2 preceding siblings ...)
  2004-11-04 23:21 ` bdavis at gcc dot gnu dot org
@ 2004-11-05  1:29 ` pinskia at gcc dot gnu dot org
  2004-11-05  9:15 ` mimo2 at free dot fr
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-05  1:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-05 01:29 -------
Yes this is invalid by reading the code.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug libfortran/18297] gfortran : file opening fails if only read access
  2004-11-04 15:46 [Bug fortran/18297] New: gfortran : file opening fails if only read access mimo2 at free dot fr
                   ` (3 preceding siblings ...)
  2004-11-05  1:29 ` pinskia at gcc dot gnu dot org
@ 2004-11-05  9:15 ` mimo2 at free dot fr
  2004-11-05 17:51 ` mimo2 at free dot fr
  2004-11-24 18:18 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mimo2 at free dot fr @ 2004-11-05  9:15 UTC (permalink / raw)
  To: gcc-bugs


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


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

* [Bug libfortran/18297] gfortran : file opening fails if only read access
  2004-11-04 15:46 [Bug fortran/18297] New: gfortran : file opening fails if only read access mimo2 at free dot fr
                   ` (4 preceding siblings ...)
  2004-11-05  9:15 ` mimo2 at free dot fr
@ 2004-11-05 17:51 ` mimo2 at free dot fr
  2004-11-24 18:18 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: mimo2 at free dot fr @ 2004-11-05 17:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mimo2 at free dot fr  2004-11-05 17:51 -------
I forgot to reopen the bug after my last comment.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


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

* [Bug libfortran/18297] gfortran : file opening fails if only read access
  2004-11-04 15:46 [Bug fortran/18297] New: gfortran : file opening fails if only read access mimo2 at free dot fr
                   ` (5 preceding siblings ...)
  2004-11-05 17:51 ` mimo2 at free dot fr
@ 2004-11-24 18:18 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ 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 -------
Just closing as a dup of bug 18653 (there was some talk about this on the mailing list).

*** This bug has been marked as a duplicate of 18653 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2004-11-24 18:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-04 15:46 [Bug fortran/18297] New: gfortran : file opening fails if only read access mimo2 at free dot fr
2004-11-04 15:51 ` [Bug libfortran/18297] " pinskia at gcc dot gnu dot org
2004-11-04 17:36 ` pinskia at gcc dot gnu dot org
2004-11-04 23:21 ` bdavis at gcc dot gnu dot org
2004-11-05  1:29 ` pinskia at gcc dot gnu dot org
2004-11-05  9:15 ` mimo2 at free dot fr
2004-11-05 17:51 ` mimo2 at free dot fr
2004-11-24 18:18 ` 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).