public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/19678] New: DOS files don't work for list directed input
@ 2005-01-28 22:54 Thomas dot Koenig at online dot de
  2005-02-02 12:41 ` [Bug libfortran/19678] " paulthomas2 at wanadoo dot fr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-28 22:54 UTC (permalink / raw)
  To: gcc-bugs

This time, the right bug report...

CR-LF (the DOS convenction for text files) as record separators
don't work for list-directed input.

$ cat dosfile.f
      program main
      write (10,'(2A)') '1',achar(13)
      rewind(10)
      read(10,*) n
      print *,n
      end
$ gfortran dosfile.f
$ ./a.out
At line 4 of file dosfile.f
Fortran runtime error: Bad integer for item 1 in list input
$ g77 dosfile.f
$ ./a.out
 1
$ od -c fort.10
0000000   1  \r  \n
0000003
$ gfortran -v
Using built-in specs.
Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,f95
Thread model: posix
gcc version 4.0.0 20050127 (experimental)

-- 
           Summary: DOS files don't work for list directed input
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Thomas dot Koenig at online dot de
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug libfortran/19678] DOS files don't work for list directed input
  2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
@ 2005-02-02 12:41 ` paulthomas2 at wanadoo dot fr
  2005-02-07 20:27 ` Thomas dot Koenig at online dot de
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-02-02 12:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From paulthomas2 at wanadoo dot fr  2005-02-02 12:40 -------
It's funny that you signal this.  I was going to suggest to the list that I fix 
it.  I was not sure that it really is a bug but it is a nuisance and is very 
easily fixed.

-- 


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


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

* [Bug libfortran/19678] DOS files don't work for list directed input
  2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
  2005-02-02 12:41 ` [Bug libfortran/19678] " paulthomas2 at wanadoo dot fr
@ 2005-02-07 20:27 ` Thomas dot Koenig at online dot de
  2005-02-24 16:21 ` coudert at clipper dot ens dot fr
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-02-07 20:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Thomas dot Koenig at online dot de  2005-02-07 08:48 -------
g77 can do this:

$ cat dosfile.f
      write(10,'(2A)') '1',achar(13)
      rewind(10)
      read (10,*) n
      print *,n
      end
$ g77 dosfile.f
$ ./a.out
 1
$ g77 -v
Reading specs from /usr/lib/gcc-lib/ia64-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=ia64-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-49)


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19292
              nThis|                            |


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


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

* [Bug libfortran/19678] DOS files don't work for list directed input
  2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
  2005-02-02 12:41 ` [Bug libfortran/19678] " paulthomas2 at wanadoo dot fr
  2005-02-07 20:27 ` Thomas dot Koenig at online dot de
@ 2005-02-24 16:21 ` coudert at clipper dot ens dot fr
  2005-02-24 17:49 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: coudert at clipper dot ens dot fr @ 2005-02-24 16:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From coudert at clipper dot ens dot fr  2005-02-24 13:46 -------
I submitted a patch to fix this bug. See
http://gcc.gnu.org/ml/fortran/2005-02/msg00303.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |coudert at clipper dot ens
                   |                            |dot fr


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


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

* [Bug libfortran/19678] DOS files don't work for list directed input
  2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
                   ` (2 preceding siblings ...)
  2005-02-24 16:21 ` coudert at clipper dot ens dot fr
@ 2005-02-24 17:49 ` pinskia at gcc dot gnu dot org
  2005-03-17 12:15 ` fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-24 17:49 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug libfortran/19678] DOS files don't work for list directed input
  2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
                   ` (3 preceding siblings ...)
  2005-02-24 17:49 ` pinskia at gcc dot gnu dot org
@ 2005-03-17 12:15 ` fxcoudert at gcc dot gnu dot org
  2005-03-25 13:35 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-03-17 12:15 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-03-17 12:15:08
               date|                            |


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


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

* [Bug libfortran/19678] DOS files don't work for list directed input
  2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
                   ` (4 preceding siblings ...)
  2005-03-17 12:15 ` fxcoudert at gcc dot gnu dot org
@ 2005-03-25 13:35 ` cvs-commit at gcc dot gnu dot org
  2005-03-25 13:37 ` fxcoudert at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-25 13:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-25 13:35 -------
Subject: Bug 19678

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fxcoudert@gcc.gnu.org	2005-03-25 13:35:29

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

Log message:
	PR libfortran/19678
	PR libfortran/19679
	* gfortran.dg/dos_eol.f: New test.
	
	PR libfortran/19678
	* list_read.c (next_char, eat_separator, finish_separator, read_real)
	(namelist_read): Add support for '\r' as well as '\n' as EOL
	character.
	
	PR libfortran/19679
	* list_read.c (read_sf): Add a '\r' in a test to support DOS
	line-endings when line length is exceeded.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5216&r2=1.5217
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/dos_eol.f.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.177&r2=1.178
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/list_read.c.diff?cvsroot=gcc&r1=1.14&r2=1.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&r1=1.32&r2=1.33



-- 


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


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

* [Bug libfortran/19678] DOS files don't work for list directed input
  2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
                   ` (5 preceding siblings ...)
  2005-03-25 13:35 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-25 13:37 ` fxcoudert at gcc dot gnu dot org
  2005-03-25 13:38 ` fxcoudert at gcc dot gnu dot org
  2005-03-25 13:41 ` cvs-commit at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-03-25 13:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fxcoudert at gcc dot gnu dot org  2005-03-25 13:37 -------
Fixed.

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


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


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

* [Bug libfortran/19678] DOS files don't work for list directed input
  2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
                   ` (6 preceding siblings ...)
  2005-03-25 13:37 ` fxcoudert at gcc dot gnu dot org
@ 2005-03-25 13:38 ` fxcoudert at gcc dot gnu dot org
  2005-03-25 13:41 ` cvs-commit at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-03-25 13:38 UTC (permalink / raw)
  To: gcc-bugs



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


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


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

* [Bug libfortran/19678] DOS files don't work for list directed input
  2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
                   ` (7 preceding siblings ...)
  2005-03-25 13:38 ` fxcoudert at gcc dot gnu dot org
@ 2005-03-25 13:41 ` cvs-commit at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-25 13:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-03-25 13:41 -------
Subject: Bug 19678

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	fxcoudert@gcc.gnu.org	2005-03-25 13:40:20

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

Log message:
	PR libfortran/19678
	* list_read.c (next_char, eat_separator, finish_separator, read_real)
	(namelist_read): Add support for '\r' as well as '\n' as EOL
	character.
	
	PR libfortran/19679
	* list_read.c (read_sf): Add a '\r' in a test to support DOS
	line-endings when line length is exceeded.
	
	PR libfortran/19678
	PR libfortran/19679
	* gfortran.dg/dos_eol.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.68&r2=1.5084.2.69
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/dos_eol.f.diff?cvsroot=gcc&only_with_tag=gcc-4_0-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=gcc-4_0-branch&r1=1.163.2.10&r2=1.163.2.11
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&r2=1.14.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.32&r2=1.32.2.1



-- 


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


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

end of thread, other threads:[~2005-03-25 13:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-28 22:54 [Bug libfortran/19678] New: DOS files don't work for list directed input Thomas dot Koenig at online dot de
2005-02-02 12:41 ` [Bug libfortran/19678] " paulthomas2 at wanadoo dot fr
2005-02-07 20:27 ` Thomas dot Koenig at online dot de
2005-02-24 16:21 ` coudert at clipper dot ens dot fr
2005-02-24 17:49 ` pinskia at gcc dot gnu dot org
2005-03-17 12:15 ` fxcoudert at gcc dot gnu dot org
2005-03-25 13:35 ` cvs-commit at gcc dot gnu dot org
2005-03-25 13:37 ` fxcoudert at gcc dot gnu dot org
2005-03-25 13:38 ` fxcoudert at gcc dot gnu dot org
2005-03-25 13:41 ` cvs-commit 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).