public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/19872] New: closed and re-opened file not overwriten
@ 2005-02-10 15:37 bdavis at gcc dot gnu dot org
  2005-02-20 15:19 ` [Bug libfortran/19872] " bdavis at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2005-02-10 15:37 UTC (permalink / raw)
  To: gcc-bugs

program wtest
      implicit none
      open(1,file='wtest.out')
      write(1,'("1 2 3 4 5 6 7 8 9")')
      close(1)
      open(1,file='wtest.out')
      write(1,'("9 8 7 6")')
      close(1)
      end


[bdavis@localhost gfortran]$ gfc a.f
[bdavis@localhost gfortran]$ ./a.out
[bdavis@localhost gfortran]$ cat wtest.out
9 8 7 6
1 2 3 4 5 6 7 8 9
[bdavis@localhost gfortran]$ g77 a.f
[bdavis@localhost gfortran]$ ./a.out
[bdavis@localhost gfortran]$ cat wtest.out
9 8 7 6

-- 
           Summary: closed and re-opened file not overwriten
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bdavis at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug libfortran/19872] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
@ 2005-02-20 15:19 ` bdavis at gcc dot gnu dot org
  2005-02-20 15:37 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2005-02-20 15:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2005-02-20 03:09 -------
proposed patch:

http://gcc.gnu.org/ml/fortran/2005-02/msg00182.html

-- 


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


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

* [Bug libfortran/19872] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
  2005-02-20 15:19 ` [Bug libfortran/19872] " bdavis at gcc dot gnu dot org
@ 2005-02-20 15:37 ` pinskia at gcc dot gnu dot org
  2005-04-10  3:43 ` cvs-commit at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-20 15:37 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |patch
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-20 06:22:35
               date|                            |


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


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

* [Bug libfortran/19872] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
  2005-02-20 15:19 ` [Bug libfortran/19872] " bdavis at gcc dot gnu dot org
  2005-02-20 15:37 ` pinskia at gcc dot gnu dot org
@ 2005-04-10  3:43 ` cvs-commit at gcc dot gnu dot org
  2005-04-10  3:52 ` kargl at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-10  3:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-10 03:43 -------
Subject: Bug 19872

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	kargl@gcc.gnu.org	2005-04-10 03:43:09

Modified files:
	libgfortran    : ChangeLog 
	libgfortran/io : transfer.c 

Log message:
	PR fortran/19872
	* io/transfer.c (data_transfer_init): truncate an existing
	file on the first write.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.187&r2=1.188
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&r1=1.34&r2=1.35



-- 


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


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

* [Bug libfortran/19872] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-04-10  3:43 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-10  3:52 ` kargl at gcc dot gnu dot org
  2005-04-10  9:37 ` [Bug libfortran/19872] [4.0 only] " tkoenig at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-04-10  3:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kargl at gcc dot gnu dot org  2005-04-10 03:52 -------
Fixed.

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


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


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

* [Bug libfortran/19872] [4.0 only] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-04-10  3:52 ` kargl at gcc dot gnu dot org
@ 2005-04-10  9:37 ` tkoenig at gcc dot gnu dot org
  2005-04-10 15:14 ` kargl at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-04-10  9:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-04-10 09:36 -------
Fixed in 4.1.0, waiting for 4.0 to reopen.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.1.0
            Summary|closed and re-opened file   |[4.0 only] closed and re-
                   |not overwriten              |opened file not overwriten


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


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

* [Bug libfortran/19872] [4.0 only] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-04-10  9:37 ` [Bug libfortran/19872] [4.0 only] " tkoenig at gcc dot gnu dot org
@ 2005-04-10 15:14 ` kargl at gcc dot gnu dot org
  2005-04-16 22:03 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-04-10 15:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kargl at gcc dot gnu dot org  2005-04-10 15:14 -------
Re-open to bug report, so patch gets committed to 4.0.1

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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


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

* [Bug libfortran/19872] [4.0 only] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-04-10 15:14 ` kargl at gcc dot gnu dot org
@ 2005-04-16 22:03 ` pinskia at gcc dot gnu dot org
  2005-05-21 20:34 ` tkoenig at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-16 22:03 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEW


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


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

* [Bug libfortran/19872] [4.0 only] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-04-16 22:03 ` pinskia at gcc dot gnu dot org
@ 2005-05-21 20:34 ` tkoenig at gcc dot gnu dot org
  2005-09-11 18:40 ` fxcoudert at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-05-21 20:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-05-21 20:34 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug libfortran/19872] [4.0 only] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-05-21 20:34 ` tkoenig at gcc dot gnu dot org
@ 2005-09-11 18:40 ` fxcoudert at gcc dot gnu dot org
  2005-09-11 18:55 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-09-11 18:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-09-11 18:40 -------
Patch was never committed to 4.0.

-- 


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


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

* [Bug libfortran/19872] [4.0 only] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-09-11 18:40 ` fxcoudert at gcc dot gnu dot org
@ 2005-09-11 18:55 ` cvs-commit at gcc dot gnu dot org
  2005-09-11 19:39 ` cvs-commit at gcc dot gnu dot org
  2005-09-11 21:50 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-11 18:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-11 18:55 -------
Subject: Bug 19872

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	fxcoudert@gcc.gnu.org	2005-09-11 18:55:16

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/io : io.h transfer.c unix.c 
Added files:
	gcc/testsuite/gfortran.dg: overwrite_1.f 

Log message:
	PR libfortran/19872
	* gfortran.dg/overwrite_1.f: New test.
	
	PR libfortran/19872
	PR libfortran/20179
	* io/unix.c (is_preconnected): Add function to test if a stream
	corresponds to a preconnected unit.
	* io/io.h: Add prototype for is_preconnected.
	* io/transfer.c (data_transfer_init): Truncate overwritten files
	on first write, but not preconnected units.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.397&r2=1.5084.2.398
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/overwrite_1.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.163.2.90&r2=1.163.2.91
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/io.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.16.10.7&r2=1.16.10.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.32.2.16&r2=1.32.2.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/unix.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.21.10.14&r2=1.21.10.15



-- 


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


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

* [Bug libfortran/19872] [4.0 only] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2005-09-11 18:55 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-11 19:39 ` cvs-commit at gcc dot gnu dot org
  2005-09-11 21:50 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-11 19:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-11 19:39 -------
Subject: Bug 19872

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fxcoudert@gcc.gnu.org	2005-09-11 19:39:35

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.dg: overwrite_1.f 

Log message:
	PR libfortran/19872
	* gfortran.dg/overwrite_1.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6045&r2=1.6046
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/overwrite_1.f.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug libfortran/19872] [4.0 only] closed and re-opened file not overwriten
  2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2005-09-11 19:39 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-11 21:50 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-11 21:50 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.1                       |4.0.2


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


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

end of thread, other threads:[~2005-09-11 21:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-10 15:37 [Bug libfortran/19872] New: closed and re-opened file not overwriten bdavis at gcc dot gnu dot org
2005-02-20 15:19 ` [Bug libfortran/19872] " bdavis at gcc dot gnu dot org
2005-02-20 15:37 ` pinskia at gcc dot gnu dot org
2005-04-10  3:43 ` cvs-commit at gcc dot gnu dot org
2005-04-10  3:52 ` kargl at gcc dot gnu dot org
2005-04-10  9:37 ` [Bug libfortran/19872] [4.0 only] " tkoenig at gcc dot gnu dot org
2005-04-10 15:14 ` kargl at gcc dot gnu dot org
2005-04-16 22:03 ` pinskia at gcc dot gnu dot org
2005-05-21 20:34 ` tkoenig at gcc dot gnu dot org
2005-09-11 18:40 ` fxcoudert at gcc dot gnu dot org
2005-09-11 18:55 ` cvs-commit at gcc dot gnu dot org
2005-09-11 19:39 ` cvs-commit at gcc dot gnu dot org
2005-09-11 21:50 ` 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).