public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17709] New: NULL I/O list and Format error.
@ 2004-09-28  9:25 wf_cs at yahoo dot com
  2004-09-28  9:29 ` [Bug fortran/17709] " wf_cs at yahoo dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: wf_cs at yahoo dot com @ 2004-09-28  9:25 UTC (permalink / raw)
  To: gcc-bugs

Test case:

program main
integer io_unit
character*80 str
io_unit = 10
open (unit=io_unit,file='in',status='old',form='formatted')
read (io_unit,'(A)') str
read (io_unit,'()') 
read (io_unit,'(A)') str
print *,str, "this should be the third line"
close(unit=io_unit,status='keep')
end

and the file named "in":

first line: aaa
second line:bbb
third line: ccc

The second read statment does not eat the second line. The output is:
second line:bbb  this should be the third line
But if we remove the first read statement, the result is correct. IMHO this is 
related with null i/o list and fmt_null. 

This is extracted from 191.fma3d.

-- 
           Summary: NULL I/O list and Format error.
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wf_cs at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux


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


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

* [Bug fortran/17709] NULL I/O list and Format error.
  2004-09-28  9:25 [Bug fortran/17709] New: NULL I/O list and Format error wf_cs at yahoo dot com
@ 2004-09-28  9:29 ` wf_cs at yahoo dot com
  2004-09-28  9:38 ` [Bug libfortran/17709] " wf_cs at yahoo dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: wf_cs at yahoo dot com @ 2004-09-28  9:29 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |15502
              nThis|                            |


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


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

* [Bug libfortran/17709] NULL I/O list and Format error.
  2004-09-28  9:25 [Bug fortran/17709] New: NULL I/O list and Format error wf_cs at yahoo dot com
  2004-09-28  9:29 ` [Bug fortran/17709] " wf_cs at yahoo dot com
@ 2004-09-28  9:38 ` wf_cs at yahoo dot com
  2004-09-28 11:40 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: wf_cs at yahoo dot com @ 2004-09-28  9:38 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|fortran                     |libfortran


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


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

* [Bug libfortran/17709] NULL I/O list and Format error.
  2004-09-28  9:25 [Bug fortran/17709] New: NULL I/O list and Format error wf_cs at yahoo dot com
  2004-09-28  9:29 ` [Bug fortran/17709] " wf_cs at yahoo dot com
  2004-09-28  9:38 ` [Bug libfortran/17709] " wf_cs at yahoo dot com
@ 2004-09-28 11:40 ` pinskia at gcc dot gnu dot org
  2004-10-06 18:28 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-28 11:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-28 11:40 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-28 11:40:33
               date|                            |


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


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

* [Bug libfortran/17709] NULL I/O list and Format error.
  2004-09-28  9:25 [Bug fortran/17709] New: NULL I/O list and Format error wf_cs at yahoo dot com
                   ` (2 preceding siblings ...)
  2004-09-28 11:40 ` pinskia at gcc dot gnu dot org
@ 2004-10-06 18:28 ` cvs-commit at gcc dot gnu dot org
  2004-10-06 19:00 ` pbrook at gcc dot gnu dot org
  2004-10-06 19:01 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-06 18:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-06 18:28 -------
Subject: Bug 17709

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pbrook@gcc.gnu.org	2004-10-06 18:27:59

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/io : transfer.c 
Added files:
	gcc/testsuite/gfortran.dg: empty_format_1.f90 

Log message:
	PR libfortran/17709
	* io/transfer.c (data_transfer_init): Reset sf_seen_eor.
	testsuite/
	* gfortran.dg/empty_format_1.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4393&r2=1.4394
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/empty_format_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.100&r2=1.101
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&r1=1.15&r2=1.16



-- 


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


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

* [Bug libfortran/17709] NULL I/O list and Format error.
  2004-09-28  9:25 [Bug fortran/17709] New: NULL I/O list and Format error wf_cs at yahoo dot com
                   ` (3 preceding siblings ...)
  2004-10-06 18:28 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-06 19:00 ` pbrook at gcc dot gnu dot org
  2004-10-06 19:01 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2004-10-06 19:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pbrook at gcc dot gnu dot org  2004-10-06 19:00 -------
Fixed. 

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


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


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

* [Bug libfortran/17709] NULL I/O list and Format error.
  2004-09-28  9:25 [Bug fortran/17709] New: NULL I/O list and Format error wf_cs at yahoo dot com
                   ` (4 preceding siblings ...)
  2004-10-06 19:00 ` pbrook at gcc dot gnu dot org
@ 2004-10-06 19:01 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-06 19:01 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2004-10-06 19:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-28  9:25 [Bug fortran/17709] New: NULL I/O list and Format error wf_cs at yahoo dot com
2004-09-28  9:29 ` [Bug fortran/17709] " wf_cs at yahoo dot com
2004-09-28  9:38 ` [Bug libfortran/17709] " wf_cs at yahoo dot com
2004-09-28 11:40 ` pinskia at gcc dot gnu dot org
2004-10-06 18:28 ` cvs-commit at gcc dot gnu dot org
2004-10-06 19:00 ` pbrook at gcc dot gnu dot org
2004-10-06 19:01 ` 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).