public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/25349] New: T edit descriptor broken for output on files
@ 2005-12-11 9:02 tkoenig at gcc dot gnu dot org
2005-12-11 10:20 ` [Bug libfortran/25349] " fxcoudert at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-12-11 9:02 UTC (permalink / raw)
To: gcc-bugs
$ cat t.f
program main
character(len=10) line
write (*,'(1X,A,T1,A)') 'A','B'
write (line,'(1X,A,T1,A)') 'A','B'
print '(A)',line
end
$ gfortran t.f
$ ./a.out
B
BA
$ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../../gcc/trunk/configure --prefix=/home/ig25
--enable-languages=c,fortran
Thread model: posix
gcc version 4.2.0 20051204 (experimental)
$ g77 t.f
$ ./a.out
BA
BA
--
Summary: T edit descriptor broken for output on files
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
OtherBugsDependingO 19292
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
@ 2005-12-11 10:20 ` fxcoudert at gcc dot gnu dot org
2005-12-11 10:57 ` tkoenig at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-12-11 10:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2005-12-11 10:20 -------
I *hate* T format descriptors. And I thought we had this topic working and
covered by the testsuite.
This is not a regression, though, since 4.0.3 segfaults on this same example.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO|19292 |
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.0.3 4.1.0 4.2.0
Last reconfirmed|0000-00-00 00:00:00 |2005-12-11 10:20:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
2005-12-11 10:20 ` [Bug libfortran/25349] " fxcoudert at gcc dot gnu dot org
@ 2005-12-11 10:57 ` tkoenig at gcc dot gnu dot org
2005-12-11 12:51 ` fxcoudert at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-12-11 10:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tkoenig at gcc dot gnu dot org 2005-12-11 10:57 -------
(In reply to comment #1)
> I *hate* T format descriptors. And I thought we had this topic working and
> covered by the testsuite.
The testsuite often uses internal writes. I just converted tl_editing.f90
to use external instead of internal I/O, and it failed, as well.
> This is not a regression, though, since 4.0.3 segfaults on this same example.
It does work with g77. Why did you remove PR 19292?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
2005-12-11 10:20 ` [Bug libfortran/25349] " fxcoudert at gcc dot gnu dot org
2005-12-11 10:57 ` tkoenig at gcc dot gnu dot org
@ 2005-12-11 12:51 ` fxcoudert at gcc dot gnu dot org
2005-12-11 13:59 ` fxcoudert at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-12-11 12:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2005-12-11 12:51 -------
(In reply to comment #2)
> It does work with g77. Why did you remove PR 19292?
Sorry, must have been a wrong keypress, didn't mean to do it.
Another thing. I updated my tree (Thomas' convert patch got in) and this
changed the problem:
$ cat t.f
write (*,'(1X,A,T1,A)') 'A','B'
end
$ gfortran t.f && ./a.out
At line 1 of file t.f
Fortran runtime error: End of record
Does someone else see this?
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |19292
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-12-11 12:51 ` fxcoudert at gcc dot gnu dot org
@ 2005-12-11 13:59 ` fxcoudert at gcc dot gnu dot org
2005-12-11 17:54 ` jvdelisle at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-12-11 13:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2005-12-11 13:59 -------
(In reply to comment #3)
> Does someone else see this?
Answering to myself: it disappeared with a clean build.
As for the cause of the problem, it's truncation after the last character
write. Another slightly different example:
$ cat t.f
open(11,status="replace")
write (11,'(A,TL2,A)') 'AA','B'
end
$ gfortran t.f && ./a.out
$ cat fort.11
B
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-12-11 10:20:20 |2005-12-11 13:59:18
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-12-11 13:59 ` fxcoudert at gcc dot gnu dot org
@ 2005-12-11 17:54 ` jvdelisle at gcc dot gnu dot org
2005-12-16 9:04 ` jvdelisle at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-11 17:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2005-12-11 17:54 -------
This is simialr to pr25264. I had to fix a regression in tl-editing, so maybe
i need to extend that to the regular files. I was beginning to wonder why
internal units seemed so different fromn files. Perhaps the underlying bug in
files, if fixed, will bring some of this code back into uniformity.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-12-11 17:54 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-16 9:04 ` jvdelisle at gcc dot gnu dot org
2005-12-16 19:32 ` jvdelisle at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-16 9:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2005-12-16 09:04 -------
Patch submitted for review and approval.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-12-16 9:04 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-16 19:32 ` jvdelisle at gcc dot gnu dot org
2005-12-16 19:40 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-16 19:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jvdelisle at gcc dot gnu dot org 2005-12-16 19:32 -------
Subject: Bug 25349
Author: jvdelisle
Date: Fri Dec 16 19:32:21 2005
New Revision: 108671
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108671
Log:
2005-12-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25264
PR libgfortran/25349
* io/unit.c (get_unit): Delete code that cleared the string when the
unit was opened, which is too soon.
* io/transfer.c (next_record_w): Pass done flag in. Change logic for
setting max_pos. Add code to position unit and pad record as needed.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/transfer.c
trunk/libgfortran/io/unit.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-12-16 19:32 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-16 19:40 ` jvdelisle at gcc dot gnu dot org
2005-12-18 8:24 ` jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-16 19:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2005-12-16 19:40 -------
Subject: Bug 25349
Author: jvdelisle
Date: Fri Dec 16 19:40:36 2005
New Revision: 108673
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108673
Log:
2005-12-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25264
PR libgfortran/25349
* gfortran.dg/tl_editing.f90: Added additional checks.
* gfortran.dg/t_editing.f: New test.
* gfortran.dg/write_padding.f90: New test
Added:
trunk/gcc/testsuite/gfortran.dg/t_editing.f
trunk/gcc/testsuite/gfortran.dg/write_padding.f90
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/tl_editing.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-12-16 19:40 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-18 8:24 ` jvdelisle at gcc dot gnu dot org
2005-12-18 8:32 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-18 8:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2005-12-18 08:24 -------
Subject: Bug 25349
Author: jvdelisle
Date: Sun Dec 18 08:24:04 2005
New Revision: 108744
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108744
Log:
2005-12-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25264
PR libgfortran/25349
* io/unit.c (get_unit): Delete code that cleared the string when the
unit was opened, which is too soon.
* io/transfer.c (next_record_w): Pass done flag in. Change logic for
setting max_pos. Add code to position unit and pad record as needed.
Modified:
branches/gcc-4_1-branch/libgfortran/ChangeLog
branches/gcc-4_1-branch/libgfortran/io/transfer.c
branches/gcc-4_1-branch/libgfortran/io/unit.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-12-18 8:24 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-18 8:32 ` jvdelisle at gcc dot gnu dot org
2005-12-19 7:23 ` jvdelisle at gcc dot gnu dot org
2006-01-01 5:27 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-18 8:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2005-12-18 08:32 -------
Subject: Bug 25349
Author: jvdelisle
Date: Sun Dec 18 08:32:09 2005
New Revision: 108745
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108745
Log:
2005-12-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25264
PR libgfortran/25349
* gfortran.dg/tl_editing.f90: Added additional checks.
* gfortran.dg/t_editing.f: New test.
* gfortran.dg/write_padding.f90: New test
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/t_editing.f
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/write_padding.f90
Modified:
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/tl_editing.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-12-18 8:32 ` jvdelisle at gcc dot gnu dot org
@ 2005-12-19 7:23 ` jvdelisle at gcc dot gnu dot org
2006-01-01 5:27 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2005-12-19 7:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2005-12-19 07:23 -------
Fixed in 4.1 and 4.2
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug libfortran/25349] T edit descriptor broken for output on files
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-12-19 7:23 ` jvdelisle at gcc dot gnu dot org
@ 2006-01-01 5:27 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-01 5:27 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25349
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-01-01 5:27 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-11 9:02 [Bug libfortran/25349] New: T edit descriptor broken for output on files tkoenig at gcc dot gnu dot org
2005-12-11 10:20 ` [Bug libfortran/25349] " fxcoudert at gcc dot gnu dot org
2005-12-11 10:57 ` tkoenig at gcc dot gnu dot org
2005-12-11 12:51 ` fxcoudert at gcc dot gnu dot org
2005-12-11 13:59 ` fxcoudert at gcc dot gnu dot org
2005-12-11 17:54 ` jvdelisle at gcc dot gnu dot org
2005-12-16 9:04 ` jvdelisle at gcc dot gnu dot org
2005-12-16 19:32 ` jvdelisle at gcc dot gnu dot org
2005-12-16 19:40 ` jvdelisle at gcc dot gnu dot org
2005-12-18 8:24 ` jvdelisle at gcc dot gnu dot org
2005-12-18 8:32 ` jvdelisle at gcc dot gnu dot org
2005-12-19 7:23 ` jvdelisle at gcc dot gnu dot org
2006-01-01 5:27 ` 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).