* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
@ 2008-01-25 20:10 ` tkoenig at gcc dot gnu dot org
2008-01-26 16:38 ` jvdelisle at gcc dot gnu dot org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-01-25 20:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tkoenig at gcc dot gnu dot org 2008-01-25 19:35 -------
Actually, it's "null bytes" :-)
This is related to PR 34887.
The problem here is that we tab further than our buffer size,
so we write out garbage.
Ceterum censeo stream I/O esse delendam :-)
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu dot
| |org
Summary|zero bytes when reverse- |null bytes when reverse-
|tabbing long records |tabbing long records
|(regression vs. g77) |(regression vs. g77)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
2008-01-25 20:10 ` [Bug libfortran/34974] null " tkoenig at gcc dot gnu dot org
@ 2008-01-26 16:38 ` jvdelisle at gcc dot gnu dot org
2008-01-26 17:06 ` jvdelisle at gcc dot gnu dot org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-01-26 16:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2008-01-26 16:22 -------
The problem first occurs at the 8192 boundary at which point we do not write
"b"
program main
write (10,'(t8193,a,t1,a)') 'b', 'a'
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
2008-01-25 20:10 ` [Bug libfortran/34974] null " tkoenig at gcc dot gnu dot org
2008-01-26 16:38 ` jvdelisle at gcc dot gnu dot org
@ 2008-01-26 17:06 ` jvdelisle at gcc dot gnu dot org
2008-01-26 20:20 ` tkoenig at gcc dot gnu dot org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-01-26 17:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2008-01-26 16:23 -------
Confirming
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-01-26 16:23:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-01-26 17:06 ` jvdelisle at gcc dot gnu dot org
@ 2008-01-26 20:20 ` tkoenig at gcc dot gnu dot org
2008-02-13 5:49 ` jvdelisle at gcc dot gnu dot org
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-01-26 20:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tkoenig at gcc dot gnu dot org 2008-01-26 19:43 -------
This one is tricky.
The problem occurs because of buffering. When tabbing to
8193 in Jerry's example, we come to the end of the
buffer and flush it.
When the record is longer than the buffer length, we'll
need to extend the buffer.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-01-26 20:20 ` tkoenig at gcc dot gnu dot org
@ 2008-02-13 5:49 ` jvdelisle at gcc dot gnu dot org
2008-02-14 6:01 ` jvdelisle at gcc dot gnu dot org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-13 5:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2008-02-13 05:48 -------
Thomas, I am going to work on this a bit. Let me know if you have already done
so.
--
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|NEW |ASSIGNED
Last reconfirmed|2008-01-26 16:23:08 |2008-02-13 05:48:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-02-13 5:49 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-14 6:01 ` jvdelisle at gcc dot gnu dot org
2008-02-14 6:07 ` jvdelisle at gcc dot gnu dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-14 6:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2008-02-14 06:00 -------
Created an attachment (id=15147)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15147&action=view)
Tentative patch
This patch fixes the test case when writing to an actual file, but not to
stdio. Stdout is not seekable so this won't work for that case. We will have
to do some more work on how we handle buffering of pre-connected units to do
better than this, and I don't think its worth the effort. (Tabbing in formats
is a heck of a way to seek. :) Regression testing this now.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-02-14 6:01 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-14 6:07 ` jvdelisle at gcc dot gnu dot org
2008-02-15 4:19 ` jvdelisle at gcc dot gnu dot org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-14 6:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jvdelisle at gcc dot gnu dot org 2008-02-14 06:07 -------
Patch in comment #6 has a regression.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-02-14 6:07 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-15 4:19 ` jvdelisle at gcc dot gnu dot org
2008-02-21 2:28 ` jvdelisle at gcc dot gnu dot org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-15 4:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2008-02-15 04:18 -------
Created an attachment (id=15154)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15154&action=view)
Revised patch
This patch regression tests OK. Same issues with stdio. Will commit for 4.4.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #15147|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (7 preceding siblings ...)
2008-02-15 4:19 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-21 2:28 ` jvdelisle at gcc dot gnu dot org
2008-02-21 2:35 ` jvdelisle at gcc dot gnu dot org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-21 2:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2008-02-21 02:27 -------
Subject: Bug 34974
Author: jvdelisle
Date: Thu Feb 21 02:27:07 2008
New Revision: 132512
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132512
Log:
2008-02-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/35132
* io/transfer.c (next_record_w): Truncate after the last record for
STREAM I/O.
PR libfortran/34954
* io/transfer.c (data_transfer_init): Initialize dtp->rec if writing.
PR libfortran/34974
* io/transfer.c (formatted_transfer_scalar): Flush the buffer if skips
is less than zero. (next_record_w): Use sseek to position the file to
the max position reached.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/transfer.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (8 preceding siblings ...)
2008-02-21 2:28 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-21 2:35 ` jvdelisle at gcc dot gnu dot org
2008-02-21 2:45 ` jvdelisle at gcc dot gnu dot org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-21 2:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2008-02-21 02:34 -------
Subject: Bug 34974
Author: jvdelisle
Date: Thu Feb 21 02:33:17 2008
New Revision: 132513
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132513
Log:
2008-02-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/34974
* gfortran.dg/fmt_t_7.f: New test.
PR libfortran/35132
* gfortran.dg/streamio_15.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/fmt_t_7.f
trunk/gcc/testsuite/gfortran.dg/streamio_15.f90
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (9 preceding siblings ...)
2008-02-21 2:35 ` jvdelisle at gcc dot gnu dot org
@ 2008-02-21 2:45 ` jvdelisle at gcc dot gnu dot org
2008-05-06 4:01 ` jvdelisle at gcc dot gnu dot org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-02-21 2:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2008-02-21 02:44 -------
Fixed on trunk, Committed as obvious. Original test case now gives:
$ od -a test.dat
0000000 a sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp
0000020 sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp
*
3641060 sp sp sp sp sp sp sp sp sp sp sp sp sp sp sp b
3641100 nl
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (10 preceding siblings ...)
2008-02-21 2:45 ` jvdelisle at gcc dot gnu dot org
@ 2008-05-06 4:01 ` jvdelisle at gcc dot gnu dot org
2008-05-06 4:36 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-05-06 4:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jvdelisle at gcc dot gnu dot org 2008-05-06 04:01 -------
Reverted patch which caused pr36131. Reopening this one.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (11 preceding siblings ...)
2008-05-06 4:01 ` jvdelisle at gcc dot gnu dot org
@ 2008-05-06 4:36 ` jvdelisle at gcc dot gnu dot org
2008-05-07 2:30 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-05-06 4:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jvdelisle at gcc dot gnu dot org 2008-05-06 04:35 -------
Janne, see discussion in comment #6
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jb at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (12 preceding siblings ...)
2008-05-06 4:36 ` jvdelisle at gcc dot gnu dot org
@ 2008-05-07 2:30 ` jvdelisle at gcc dot gnu dot org
2008-05-15 18:35 ` jb at gcc dot gnu dot org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-05-07 2:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from jvdelisle at gcc dot gnu dot org 2008-05-07 02:29 -------
Subject: Bug 34974
Author: jvdelisle
Date: Wed May 7 02:28:45 2008
New Revision: 135017
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135017
Log:
2008-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/34974
gfortran.dg/fmt_t_7.f: XFAIL this until we get issue resolved.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/fmt_t_7.f
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (13 preceding siblings ...)
2008-05-07 2:30 ` jvdelisle at gcc dot gnu dot org
@ 2008-05-15 18:35 ` jb at gcc dot gnu dot org
2008-05-15 18:37 ` jb at gcc dot gnu dot org
2008-05-16 3:12 ` jvdelisle at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: jb at gcc dot gnu dot org @ 2008-05-15 18:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jb at gcc dot gnu dot org 2008-05-15 18:33 -------
Subject: Bug 34974
Author: jb
Date: Thu May 15 18:30:29 2008
New Revision: 135388
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=135388
Log:
Remove XFAIL from gfortran.dg/fmt_t_7.f
2008-05-15 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/34974
* gfortran.dg/fmt_t_7.f: Remove XFAIL, patch for PR 25561/Part 1 fixes
this.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/fmt_t_7.f
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (14 preceding siblings ...)
2008-05-15 18:35 ` jb at gcc dot gnu dot org
@ 2008-05-15 18:37 ` jb at gcc dot gnu dot org
2008-05-16 3:12 ` jvdelisle at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: jb at gcc dot gnu dot org @ 2008-05-15 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from jb at gcc dot gnu dot org 2008-05-15 18:35 -------
Closing as fixed, see commit msg above.
--
jb at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libfortran/34974] null bytes when reverse-tabbing long records (regression vs. g77)
2008-01-25 19:53 [Bug libfortran/34974] New: zero bytes when reverse-tabbing long records (regression vs. g77) tkoenig at gcc dot gnu dot org
` (15 preceding siblings ...)
2008-05-15 18:37 ` jb at gcc dot gnu dot org
@ 2008-05-16 3:12 ` jvdelisle at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-05-16 3:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from jvdelisle at gcc dot gnu dot org 2008-05-16 03:12 -------
The test case needs { target fd_truncate } I will fix it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34974
^ permalink raw reply [flat|nested] 18+ messages in thread