public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/14904] New: [gfortran] INQUIRE returns incorrect LASTREC on multiple writes to DIRECT, FORMATTED units.
@ 2004-04-10 3:02 bdavis9659 at comcast dot net
2004-04-10 14:05 ` [Bug libfortran/14904] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: bdavis9659 at comcast dot net @ 2004-04-10 3:02 UTC (permalink / raw)
To: gcc-bugs
>From NIST test FM912.FOR.
When more than one record is written to a direct access formatted unit with one
write statement, inquire should increment LASTREC to reflect the number of
records written. Currently, it assumes one write = one record written, which is
wrong.
Small example :
OPEN(UNIT=10,ACCESS='DIRECT',FORM='FORMATTED',RECL=120)
100 FORMAT(I4)
WRITE(UNIT=10,REC=1,FMT=100)1
INQUIRE(UNIT=10,NEXTREC=J)
PRINT*,J
200 FORMAT(I4,/,I4)
WRITE(UNIT=10,REC=2,FMT=200)2,3
INQUIRE(UNIT=10,NEXTREC=J)
PRINT*,J
END
$ gfc inquire.f
$ ./a.out
2
3
^^^
should be 4
$ g77 inquire.f
$ ./a.out
2
4
$ gfortran --version
GNU Fortran 95 (GCC 3.5-tree-ssa 20040410 (merged 20040331))
--
Summary: [gfortran] INQUIRE returns incorrect LASTREC on
multiple writes to DIRECT, FORMATTED units.
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bdavis9659 at comcast dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14904
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libfortran/14904] [gfortran] INQUIRE returns incorrect LASTREC on multiple writes to DIRECT, FORMATTED units.
2004-04-10 3:02 [Bug libfortran/14904] New: [gfortran] INQUIRE returns incorrect LASTREC on multiple writes to DIRECT, FORMATTED units bdavis9659 at comcast dot net
@ 2004-04-10 14:05 ` pinskia at gcc dot gnu dot org
2004-04-11 19:11 ` cvs-commit at gcc dot gnu dot org
2004-04-11 19:22 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-10 14:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-10 04:03 -------
Confirmed, patch is here: <http://gcc.gnu.org/ml/fortran/2004-04/msg00077.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |patch
Last reconfirmed|0000-00-00 00:00:00 |2004-04-10 04:03:07
date| |
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14904
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libfortran/14904] [gfortran] INQUIRE returns incorrect LASTREC on multiple writes to DIRECT, FORMATTED units.
2004-04-10 3:02 [Bug libfortran/14904] New: [gfortran] INQUIRE returns incorrect LASTREC on multiple writes to DIRECT, FORMATTED units bdavis9659 at comcast dot net
2004-04-10 14:05 ` [Bug libfortran/14904] " pinskia at gcc dot gnu dot org
@ 2004-04-11 19:11 ` cvs-commit at gcc dot gnu dot org
2004-04-11 19:22 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-04-11 19:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-04-11 17:00 -------
Subject: Bug 14904
CVSROOT: /cvs/gcc
Module name: gcc
Branch: tree-ssa-20020619-branch
Changes by: bdavis@gcc.gnu.org 2004-04-11 17:00:38
Modified files:
gcc/testsuite : ChangeLog.tree-ssa
libgfortran : ChangeLog
libgfortran/io : transfer.c
Added files:
gcc/testsuite/gfortran.fortran-torture/execute: inquire_4.f90
Log message:
PR fortran/14904
* io/transfer.c (next_record): Update last_record when
more than one record is written to a direct access file
with one write statement.
* gfortran.fortran-torture/execute/inquire_4.f90: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.221&r2=1.1.2.222
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/execute/inquire_4.f90.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-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=tree-ssa-20020619-branch&r1=1.1.2.43&r2=1.1.2.44
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.13&r2=1.1.2.14
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14904
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libfortran/14904] [gfortran] INQUIRE returns incorrect LASTREC on multiple writes to DIRECT, FORMATTED units.
2004-04-10 3:02 [Bug libfortran/14904] New: [gfortran] INQUIRE returns incorrect LASTREC on multiple writes to DIRECT, FORMATTED units bdavis9659 at comcast dot net
2004-04-10 14:05 ` [Bug libfortran/14904] " pinskia at gcc dot gnu dot org
2004-04-11 19:11 ` cvs-commit at gcc dot gnu dot org
@ 2004-04-11 19:22 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-11 19:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-11 17:19 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14904
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-04-11 17:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-10 3:02 [Bug libfortran/14904] New: [gfortran] INQUIRE returns incorrect LASTREC on multiple writes to DIRECT, FORMATTED units bdavis9659 at comcast dot net
2004-04-10 14:05 ` [Bug libfortran/14904] " pinskia at gcc dot gnu dot org
2004-04-11 19:11 ` cvs-commit at gcc dot gnu dot org
2004-04-11 19:22 ` 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).