Bug 19216 - list directed read with leading slash (NIST FM923)
Summary: list directed read with leading slash (NIST FM923)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: 4.0.1
: P2 normal
Target Milestone: 4.0.1
Assignee: Francois-Xavier Coudert
URL: http://gcc.gnu.org/ml/fortran/2005-06...
Keywords: patch
Depends on:
Blocks: 19292 21875
  Show dependency treegraph
 
Reported: 2005-01-01 03:38 UTC by Bud Davis
Modified: 2005-06-18 23:19 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-06-01 11:17:25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bud Davis 2005-01-01 03:38:03 UTC
This is from FM923.FOR

$ cat b.f
       INTEGER J1I(3)
       DATA J1I / 3,2,1 /
       WRITE(20,'(A)')'/ 10 20 30'
       WRITE(20,'(A)')'1 2 3 4'
       WRITE(20,'(A)')'5 6 7 8'
       REWIND(20)
       READ(20,*) (J1I(IVI), IVI=1,3)
       PRINT*,(J1I(IVI), IVI=1,3)
       READ(20,*) I,J
       PRINT*,I,J
       READ(20,*) I,J
       PRINT*,I,J
       END
$ gfc b.f
$ ./a.out
           1           2           1
           5           6
At line 11 of file b.f
Fortran runtime error: End of file
$ g77 b.f
$ ./a.out
 3 2 1
 1 2
 5 6

$ gfc --version
GNU Fortran 95 (GCC 4.0.0 20050101 (experimental))
Comment 1 Andrew Pinski 2005-01-01 03:42:09 UTC
Confirmed.
Comment 2 Francois-Xavier Coudert 2005-04-15 08:58:50 UTC
Patch: http://gcc.gnu.org/ml/fortran/2005-03/msg00562.html
Comment 3 CVS Commits 2005-04-18 07:05:38 UTC
Subject: Bug 19216

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fxcoudert@gcc.gnu.org	2005-04-18 07:05:28

Modified files:
	gcc/testsuite  : ChangeLog 

Log message:
	PR libfortran/19216
	* gfortran.dg/pr19216.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5362&r2=1.5363

Comment 4 Francois-Xavier Coudert 2005-04-18 07:18:06 UTC
This is fixed by Paul T. Richard's namelist patch, but there still is a testcase
(gfortran.dg/pr19216.f) to commit on 4.0 branch.
Comment 5 kargl 2005-05-30 15:17:39 UTC
FX,

Can you commit the testcase and close this PR?

steve
Comment 6 Francois-Xavier Coudert 2005-06-01 11:17:24 UTC
This is more complex than I thought. It appears that:

  1. there is a typo (space missing in dg command) in the testcase

  2. when the typo is corrected and the testcase is really ran, it FAILs on both
mainline and 4.0

I'll be looking into this.
Comment 7 CVS Commits 2005-06-16 22:51:08 UTC
Subject: Bug 19216

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fxcoudert@gcc.gnu.org	2005-06-16 22:50:51

Modified files:
	libgfortran    : ChangeLog 
	libgfortran/io : list_read.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/gfortran.dg: pr19216.f 

Log message:
	PR libfortran/19216
	* io/list_read.c (eat_separator): No need to call next_record,
	even in non-namelist_mode.
	* gfortran.dg/pr19216.f: Add correct space between brackets and
	dg directive.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.244&r2=1.245
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/list_read.c.diff?cvsroot=gcc&r1=1.22&r2=1.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5644&r2=1.5645
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr19216.f.diff?cvsroot=gcc&r1=1.1&r2=1.2

Comment 8 CVS Commits 2005-06-16 23:01:02 UTC
Subject: Bug 19216

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	fxcoudert@gcc.gnu.org	2005-06-16 23:00:41

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/io : list_read.c 
Added files:
	gcc/testsuite/gfortran.dg: pr19216.f 

Log message:
	PR libfortran/19216
	* io/list_read.c (eat_separator): No need to call next_record,
	even in non-namelist_mode.
	* gfortran.dg/pr19216.f: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.241&r2=1.5084.2.242
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pr19216.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.2.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.163.2.53&r2=1.163.2.54
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/list_read.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.14.2.2&r2=1.14.2.3

Comment 9 Francois-Xavier Coudert 2005-06-16 23:03:38 UTC
Fixed.