public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libfortran/45723] New: opening /dev/null for appending writes
@ 2010-09-18 18:34 Joost dot VandeVondele at pci dot uzh dot ch
2010-09-18 18:35 ` [Bug libfortran/45723] " Joost dot VandeVondele at pci dot uzh dot ch
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: Joost dot VandeVondele at pci dot uzh dot ch @ 2010-09-18 18:34 UTC (permalink / raw)
To: gcc-bugs
I'm wondering if the following open statement should really fail. I have no
strong opinion, but it would be convenient if it 'just' worked, like you can
open an non-existing file and 'append'.
I guess it is related to the fact that /dev/null can't be seeked.
> cat test.f90
OPEN(UNIT=7,FILE="/dev/null",FORM="FORMATTED",POSITION="APPEND",IOSTAT=istat)
IF (istat.NE.0) STOP 1
END
--
Summary: opening /dev/null for appending writes
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Joost dot VandeVondele at pci dot uzh dot ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libfortran/45723] opening /dev/null for appending writes 2010-09-18 18:34 [Bug libfortran/45723] New: opening /dev/null for appending writes Joost dot VandeVondele at pci dot uzh dot ch @ 2010-09-18 18:35 ` Joost dot VandeVondele at pci dot uzh dot ch 2010-09-19 20:01 ` jvdelisle at gcc dot gnu dot org ` (5 subsequent siblings) 6 siblings, 0 replies; 10+ messages in thread From: Joost dot VandeVondele at pci dot uzh dot ch @ 2010-09-18 18:35 UTC (permalink / raw) To: gcc-bugs -- Joost dot VandeVondele at pci dot uzh dot ch changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libfortran/45723] opening /dev/null for appending writes 2010-09-18 18:34 [Bug libfortran/45723] New: opening /dev/null for appending writes Joost dot VandeVondele at pci dot uzh dot ch 2010-09-18 18:35 ` [Bug libfortran/45723] " Joost dot VandeVondele at pci dot uzh dot ch @ 2010-09-19 20:01 ` jvdelisle at gcc dot gnu dot org 2010-09-20 4:46 ` jvdelisle at gcc dot gnu dot org ` (4 subsequent siblings) 6 siblings, 0 replies; 10+ messages in thread From: jvdelisle at gcc dot gnu dot org @ 2010-09-19 20:01 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from jvdelisle at gcc dot gnu dot org 2010-09-19 20:01 ------- This is an OS specific error. libgfortran is attempting to seek to the end of the file to prepare for appending. Obviously, one can not seek /dev/null. I will see if we can detect that the file is unseekable and if that is the case we can start appending AS-IS. -- jvdelisle at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-09-19 20:01:18 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libfortran/45723] opening /dev/null for appending writes 2010-09-18 18:34 [Bug libfortran/45723] New: opening /dev/null for appending writes Joost dot VandeVondele at pci dot uzh dot ch 2010-09-18 18:35 ` [Bug libfortran/45723] " Joost dot VandeVondele at pci dot uzh dot ch 2010-09-19 20:01 ` jvdelisle at gcc dot gnu dot org @ 2010-09-20 4:46 ` jvdelisle at gcc dot gnu dot org 2010-09-20 6:30 ` Joost dot VandeVondele at pci dot uzh dot ch ` (3 subsequent siblings) 6 siblings, 0 replies; 10+ messages in thread From: jvdelisle at gcc dot gnu dot org @ 2010-09-20 4:46 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from jvdelisle at gcc dot gnu dot org 2010-09-20 04:46 ------- Created an attachment (id=21841) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21841&action=view) Possible patch This patch passes regression testing. Don't seek if filesize is zero. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libfortran/45723] opening /dev/null for appending writes 2010-09-18 18:34 [Bug libfortran/45723] New: opening /dev/null for appending writes Joost dot VandeVondele at pci dot uzh dot ch ` (2 preceding siblings ...) 2010-09-20 4:46 ` jvdelisle at gcc dot gnu dot org @ 2010-09-20 6:30 ` Joost dot VandeVondele at pci dot uzh dot ch 2010-09-22 3:11 ` jvdelisle at gcc dot gnu dot org ` (2 subsequent siblings) 6 siblings, 0 replies; 10+ messages in thread From: Joost dot VandeVondele at pci dot uzh dot ch @ 2010-09-20 6:30 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from Joost dot VandeVondele at pci dot uzh dot ch 2010-09-20 06:30 ------- (In reply to comment #2) > Created an attachment (id=21841) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21841&action=view) [edit] > Possible patch > > This patch passes regression testing. Don't seek if filesize is zero. > seems like a clean solution... thanks. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libfortran/45723] opening /dev/null for appending writes 2010-09-18 18:34 [Bug libfortran/45723] New: opening /dev/null for appending writes Joost dot VandeVondele at pci dot uzh dot ch ` (3 preceding siblings ...) 2010-09-20 6:30 ` Joost dot VandeVondele at pci dot uzh dot ch @ 2010-09-22 3:11 ` jvdelisle at gcc dot gnu dot org 2010-09-22 11:31 ` Joost dot VandeVondele at pci dot uzh dot ch 2010-09-22 15:07 ` jvdelisle at gcc dot gnu dot org 6 siblings, 0 replies; 10+ messages in thread From: jvdelisle at gcc dot gnu dot org @ 2010-09-22 3:11 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from jvdelisle at gcc dot gnu dot org 2010-09-22 03:10 ------- Subject: Bug 45723 Author: jvdelisle Date: Wed Sep 22 03:10:24 2010 New Revision: 164507 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164507 Log: 2010-09-21 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/45723 * io/open.c (new_unit): On POSITION_APPEND don't seek if file length is zero. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/io/open.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libfortran/45723] opening /dev/null for appending writes 2010-09-18 18:34 [Bug libfortran/45723] New: opening /dev/null for appending writes Joost dot VandeVondele at pci dot uzh dot ch ` (4 preceding siblings ...) 2010-09-22 3:11 ` jvdelisle at gcc dot gnu dot org @ 2010-09-22 11:31 ` Joost dot VandeVondele at pci dot uzh dot ch 2010-09-22 15:07 ` jvdelisle at gcc dot gnu dot org 6 siblings, 0 replies; 10+ messages in thread From: Joost dot VandeVondele at pci dot uzh dot ch @ 2010-09-22 11:31 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from Joost dot VandeVondele at pci dot uzh dot ch 2010-09-22 11:31 ------- I guess this bug can be closed unless you intend backporting to earlier versions. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libfortran/45723] opening /dev/null for appending writes 2010-09-18 18:34 [Bug libfortran/45723] New: opening /dev/null for appending writes Joost dot VandeVondele at pci dot uzh dot ch ` (5 preceding siblings ...) 2010-09-22 11:31 ` Joost dot VandeVondele at pci dot uzh dot ch @ 2010-09-22 15:07 ` jvdelisle at gcc dot gnu dot org 6 siblings, 0 replies; 10+ messages in thread From: jvdelisle at gcc dot gnu dot org @ 2010-09-22 15:07 UTC (permalink / raw) To: gcc-bugs ------- Comment #6 from jvdelisle at gcc dot gnu dot org 2010-09-22 15:07 ------- I don't see a need to backport. Closing -- jvdelisle at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723 ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <bug-45723-4@http.gcc.gnu.org/bugzilla/>]
* [Bug libfortran/45723] opening /dev/null for appending writes [not found] <bug-45723-4@http.gcc.gnu.org/bugzilla/> @ 2011-11-07 14:33 ` jb at gcc dot gnu.org 2011-11-07 14:37 ` jb at gcc dot gnu.org 1 sibling, 0 replies; 10+ messages in thread From: jb at gcc dot gnu.org @ 2011-11-07 14:33 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723 --- Comment #7 from Janne Blomqvist <jb at gcc dot gnu.org> 2011-11-07 14:32:56 UTC --- Author: jb Date: Mon Nov 7 14:32:50 2011 New Revision: 181085 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181085 Log: Revert previous fix for PR 45723. libgfortran ChangeLog: 2011-11-07 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/45723 * io/open.c (new_unit): Don't check file size before attempting seek. testsuite ChangeLog: 2011-11-07 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/45723 * gfortran.dg/open_dev_null.F90: Remove testcase. Removed: trunk/gcc/testsuite/gfortran.dg/open_dev_null.f90 Modified: trunk/gcc/testsuite/ChangeLog trunk/libgfortran/ChangeLog trunk/libgfortran/io/open.c ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug libfortran/45723] opening /dev/null for appending writes [not found] <bug-45723-4@http.gcc.gnu.org/bugzilla/> 2011-11-07 14:33 ` jb at gcc dot gnu.org @ 2011-11-07 14:37 ` jb at gcc dot gnu.org 1 sibling, 0 replies; 10+ messages in thread From: jb at gcc dot gnu.org @ 2011-11-07 14:37 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45723 Janne Blomqvist <jb at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jb at gcc dot gnu.org --- Comment #8 from Janne Blomqvist <jb at gcc dot gnu.org> 2011-11-07 14:35:57 UTC --- For the motivations behind this revert, see http://gcc.gnu.org/ml/fortran/2011-10/msg00289.html For the short version: Note that seeking on /dev/null still works at least on Linux. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-11-07 14:37 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-09-18 18:34 [Bug libfortran/45723] New: opening /dev/null for appending writes Joost dot VandeVondele at pci dot uzh dot ch 2010-09-18 18:35 ` [Bug libfortran/45723] " Joost dot VandeVondele at pci dot uzh dot ch 2010-09-19 20:01 ` jvdelisle at gcc dot gnu dot org 2010-09-20 4:46 ` jvdelisle at gcc dot gnu dot org 2010-09-20 6:30 ` Joost dot VandeVondele at pci dot uzh dot ch 2010-09-22 3:11 ` jvdelisle at gcc dot gnu dot org 2010-09-22 11:31 ` Joost dot VandeVondele at pci dot uzh dot ch 2010-09-22 15:07 ` jvdelisle at gcc dot gnu dot org [not found] <bug-45723-4@http.gcc.gnu.org/bugzilla/> 2011-11-07 14:33 ` jb at gcc dot gnu.org 2011-11-07 14:37 ` jb at gcc dot gnu.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).