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

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).