public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31207] New: wrong code generated with gfortran
@ 2007-03-16 11:29 jv244 at cam dot ac dot uk
2007-03-17 15:37 ` [Bug fortran/31207] advance="no" and tabs tkoenig at gcc dot gnu dot org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-03-16 11:29 UTC (permalink / raw)
To: gcc-bugs
With a recent gfortran, the following compiles, but generates the wrong
results:
character(len=20) :: b
! write something no advance
open(10,FILE="fort.10",POSITION="REWIND")
write(10, '(a,t1,a)',advance='no') 'XXXXXX', 'ABC'
close(10)
! append some data
open(10,FILE="fort.10",POSITION="APPEND")
write(10, '(a)') 'DEF'
close(10)
! check what is in the first record
open(10,FILE="fort.10",POSITION="REWIND")
read(10,'(a)') b
IF (b.NE."ABCXXX") CALL ABORT()
END
--
Summary: wrong code generated with gfortran
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
@ 2007-03-17 15:37 ` tkoenig at gcc dot gnu dot org
2007-03-17 16:00 ` jvdelisle at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-03-17 15:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tkoenig at gcc dot gnu dot org 2007-03-17 15:36 -------
Confirmed.
Reduced test case:
$ cat rewind-2.f90
program main
write (*,'(A,T1,A)',advance="no") 'XXXXXX','ABC'
end program main
$ gfortran rewind-2.f90
$ ./a.out
ABC$
Jerry, I'm putting you on the CC list for this one. I'll
see whether I have time for a look.
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu dot
| |org, tkoenig at gcc dot gnu
| |dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-03-17 15:36:58
date| |
Summary|wrong code generated with |advance="no" and tabs
|gfortran |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
2007-03-17 15:37 ` [Bug fortran/31207] advance="no" and tabs tkoenig at gcc dot gnu dot org
@ 2007-03-17 16:00 ` jvdelisle at gcc dot gnu dot org
2007-03-25 23:00 ` jvdelisle at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-03-17 16:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2007-03-17 15:59 -------
I have started looking at this. I believe its a duplicate of 31199. In using
advance=no we are failing to retain or use the information about the maximum
position reached during preceding writes.
*** This bug has been marked as a duplicate of 31199 ***
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
2007-03-17 15:37 ` [Bug fortran/31207] advance="no" and tabs tkoenig at gcc dot gnu dot org
2007-03-17 16:00 ` jvdelisle at gcc dot gnu dot org
@ 2007-03-25 23:00 ` jvdelisle at gcc dot gnu dot org
2007-03-25 23:01 ` jvdelisle at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-03-25 23:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2007-03-26 01:00 -------
Turns out this is not a duplicate of 31199. However its is closel related. I
wll work this one as well.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2007-03-25 23:00 ` jvdelisle at gcc dot gnu dot org
@ 2007-03-25 23:01 ` jvdelisle at gcc dot gnu dot org
2007-04-01 4:00 ` patchapp at dberlin dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-03-25 23:01 UTC (permalink / raw)
To: gcc-bugs
--
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|REOPENED |ASSIGNED
Last reconfirmed|2007-03-17 15:36:58 |2007-03-26 00:00:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (3 preceding siblings ...)
2007-03-25 23:01 ` jvdelisle at gcc dot gnu dot org
@ 2007-04-01 4:00 ` patchapp at dberlin dot org
2007-04-01 15:24 ` jvdelisle at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: patchapp at dberlin dot org @ 2007-04-01 4:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from patchapp at dberlin dot org 2007-04-01 05:00 -------
Subject: Bug number PR31207
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00001.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (4 preceding siblings ...)
2007-04-01 4:00 ` patchapp at dberlin dot org
@ 2007-04-01 15:24 ` jvdelisle at gcc dot gnu dot org
2007-04-01 15:29 ` jvdelisle at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-04-01 15:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2007-04-01 16:24 -------
Subject: Bug 31207
Author: jvdelisle
Date: Sun Apr 1 16:23:48 2007
New Revision: 123401
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123401
Log:
2007-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31366
* io/transfer.c (read_block_direct): Do not generate error when reading
past EOF on a short record that is less than the RECL= specified.
2007-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31207
* io/unit.c (close_unit_1): If there are bytes previously written from
ADVANCE="no", move to the end before closing.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/transfer.c
trunk/libgfortran/io/unit.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (5 preceding siblings ...)
2007-04-01 15:24 ` jvdelisle at gcc dot gnu dot org
@ 2007-04-01 15:29 ` jvdelisle at gcc dot gnu dot org
2007-04-13 18:45 ` [Bug fortran/31207] [4.2 only] " burnus at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-04-01 15:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2007-04-01 16:29 -------
Subject: Bug 31207
Author: jvdelisle
Date: Sun Apr 1 16:29:05 2007
New Revision: 123402
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123402
Log:
2007-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31366
* gfortran.dg/direct_io_6.f90: New test.
2007-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/31207
* gfortran.dg/advance_5.f90: New test.
* gfortran.dg/advance_6.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/advance_4.f90
trunk/gcc/testsuite/gfortran.dg/advance_5.f90
trunk/gcc/testsuite/gfortran.dg/direct_io_6.f90
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] [4.2 only] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (6 preceding siblings ...)
2007-04-01 15:29 ` jvdelisle at gcc dot gnu dot org
@ 2007-04-13 18:45 ` burnus at gcc dot gnu dot org
2007-04-17 18:08 ` fxcoudert at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-04-13 18:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from burnus at gcc dot gnu dot org 2007-04-13 19:45 -------
What's the plan regarding backporting the patch to GCC 4.2?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] [4.2 only] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (7 preceding siblings ...)
2007-04-13 18:45 ` [Bug fortran/31207] [4.2 only] " burnus at gcc dot gnu dot org
@ 2007-04-17 18:08 ` fxcoudert at gcc dot gnu dot org
2007-04-18 4:25 ` [Bug fortran/31207] [4.2.1 " jvdelisle at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-04-17 18:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from fxcoudert at gcc dot gnu dot org 2007-04-17 19:08 -------
It's not a regression wrt 4.1.2 (just checked) and I don't think it's a
regression wrt g77 either, so it's a no. (Plus, with the morbid state of 4.2,
I'm not sure we need to put effort there).
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] [4.2.1 only] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (8 preceding siblings ...)
2007-04-17 18:08 ` fxcoudert at gcc dot gnu dot org
@ 2007-04-18 4:25 ` jvdelisle at gcc dot gnu dot org
2007-04-18 5:46 ` fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-04-18 4:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2007-04-18 05:25 -------
Its not a regression, but I would like to keep track of this for 4.2.1 along
with 31051
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |31051
Status|RESOLVED |REOPENED
Resolution|FIXED |
Summary|[4.2 only] advance="no" and |[4.2.1 only] advance="no"
|tabs |and tabs
Target Milestone|4.3.0 |4.2.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] [4.2.1 only] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (9 preceding siblings ...)
2007-04-18 4:25 ` [Bug fortran/31207] [4.2.1 " jvdelisle at gcc dot gnu dot org
@ 2007-04-18 5:46 ` fxcoudert at gcc dot gnu dot org
2007-04-18 13:51 ` jvdelisle at gcc dot gnu dot org
2007-05-20 22:26 ` jvdelisle at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-04-18 5:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from fxcoudert at gcc dot gnu dot org 2007-04-18 06:46 -------
Created an attachment (id=13386)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13386&action=view)
Output of different versions of gfortran
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] [4.2.1 only] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (10 preceding siblings ...)
2007-04-18 5:46 ` fxcoudert at gcc dot gnu dot org
@ 2007-04-18 13:51 ` jvdelisle at gcc dot gnu dot org
2007-05-20 22:26 ` jvdelisle at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-04-18 13:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2007-04-18 14:51 -------
output.tar attachment should go to pr31409
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/31207] [4.2.1 only] advance="no" and tabs
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
` (11 preceding siblings ...)
2007-04-18 13:51 ` jvdelisle at gcc dot gnu dot org
@ 2007-05-20 22:26 ` jvdelisle at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-05-20 22:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jvdelisle at gcc dot gnu dot org 2007-05-20 23:25 -------
This is not a regression. Was not supported by g77. Fixed on 4.3
Closing
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31207
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2007-05-20 22:26 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-16 11:29 [Bug fortran/31207] New: wrong code generated with gfortran jv244 at cam dot ac dot uk
2007-03-17 15:37 ` [Bug fortran/31207] advance="no" and tabs tkoenig at gcc dot gnu dot org
2007-03-17 16:00 ` jvdelisle at gcc dot gnu dot org
2007-03-25 23:00 ` jvdelisle at gcc dot gnu dot org
2007-03-25 23:01 ` jvdelisle at gcc dot gnu dot org
2007-04-01 4:00 ` patchapp at dberlin dot org
2007-04-01 15:24 ` jvdelisle at gcc dot gnu dot org
2007-04-01 15:29 ` jvdelisle at gcc dot gnu dot org
2007-04-13 18:45 ` [Bug fortran/31207] [4.2 only] " burnus at gcc dot gnu dot org
2007-04-17 18:08 ` fxcoudert at gcc dot gnu dot org
2007-04-18 4:25 ` [Bug fortran/31207] [4.2.1 " jvdelisle at gcc dot gnu dot org
2007-04-18 5:46 ` fxcoudert at gcc dot gnu dot org
2007-04-18 13:51 ` jvdelisle at gcc dot gnu dot org
2007-05-20 22:26 ` jvdelisle 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).