public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input
@ 2005-02-20 3:04 dir at lanl dot gov
2005-02-20 3:09 ` [Bug libfortran/20092] " pinskia at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: dir at lanl dot gov @ 2005-02-20 3:04 UTC (permalink / raw)
To: gcc-bugs
Several of my progams use this method to read from the keyboard or a text file.
It should read input and print it until the first character on a line is a 's'.
Absoft 8.0 shows the correct response. gfortran gets a run time error reading
from a file and ignores the carrage returns when reading the keyboard.
[dir:~/tests/gfortran] dir% f77 -o char3 char3.f
FORTRAN 77 Compiler 8.0a, Copyright (c) 1987-2003, Absoft Corp.
[dir:~/tests/gfortran] dir% char3 <in3
one
two
s
[dir:~/tests/gfortran] dir% char3
one
one
two
two
s
s
[dir:~/tests/gfortran] dir% gfortran -o char3 char3.f
[dir:~/tests/gfortran] dir% char3 <in3
At line 4 of file char3.f
Fortran runtime error: End of file
[dir:~/tests/gfortran] dir% char3
one
two
s
s
^C
[dir:~/tests/gfortran] dir% cat char3.f
program main
character*1 a(80)
10 continue
read(5,2000)a
write(6,2000)a
if(a(1).ne.'s')goto 10
stop
2000 format(80a1)
end
[dir:~/tests/gfortran] dir% cat in3
one
two
s
--
Summary: gfortran not correctly padding keyboard or text file
input
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dir at lanl dot gov
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: powerpc-apple-darwin7.8.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] gfortran not correctly padding keyboard or text file input
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
@ 2005-02-20 3:09 ` pinskia at gcc dot gnu dot org
2005-02-20 17:01 ` Thomas dot Koenig at online dot de
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-20 3:09 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|fortran |libfortran
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] gfortran not correctly padding keyboard or text file input
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
2005-02-20 3:09 ` [Bug libfortran/20092] " pinskia at gcc dot gnu dot org
@ 2005-02-20 17:01 ` Thomas dot Koenig at online dot de
2005-02-22 0:33 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-02-20 17:01 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |Thomas dot Koenig at online
| |dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] gfortran not correctly padding keyboard or text file input
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
2005-02-20 3:09 ` [Bug libfortran/20092] " pinskia at gcc dot gnu dot org
2005-02-20 17:01 ` Thomas dot Koenig at online dot de
@ 2005-02-22 0:33 ` pinskia at gcc dot gnu dot org
2005-03-13 18:56 ` [Bug libfortran/20092] console input doesn't deal correctly with CR tobi at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-22 0:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-21 21:36 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |19292
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-02-21 21:36:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] console input doesn't deal correctly with CR
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
` (2 preceding siblings ...)
2005-02-22 0:33 ` pinskia at gcc dot gnu dot org
@ 2005-03-13 18:56 ` tobi at gcc dot gnu dot org
2005-03-13 21:10 ` Thomas dot Koenig at online dot de
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-03-13 18:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2005-03-13 18:56 -------
The problem is that carriage return is not dealt with correctly. See the
following session, where 80 is replaced by 10 in the testcase:
[tobi@marktplatz tests]$ ./a.out
12345678901234567890 <- input
1234567890 <- output
1 <- input
2
3
4
5
6
7
8
9
0 <- till here
1234567890 <- output
s123456789 <- input
s123456789 <- output
STOP 0
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|gfortran not correctly |console input doesn't deal
|padding keyboard or text |correctly with CR
|file input |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] console input doesn't deal correctly with CR
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
` (3 preceding siblings ...)
2005-03-13 18:56 ` [Bug libfortran/20092] console input doesn't deal correctly with CR tobi at gcc dot gnu dot org
@ 2005-03-13 21:10 ` Thomas dot Koenig at online dot de
2005-04-10 8:38 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-03-13 21:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2005-03-13 21:10 -------
I believe this is also fixed with
http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00729.html
Copyright papers, where are you? :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] console input doesn't deal correctly with CR
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
` (4 preceding siblings ...)
2005-03-13 21:10 ` Thomas dot Koenig at online dot de
@ 2005-04-10 8:38 ` cvs-commit at gcc dot gnu dot org
2005-04-10 8:41 ` tkoenig at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-10 8:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-04-10 08:36 -------
Subject: Bug 20092
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: tkoenig@gcc.gnu.org 2005-04-10 08:35:40
Modified files:
libgfortran : ChangeLog
libgfortran/io : transfer.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: eor_handling_1.f90 eor_handling_2.f90
eor_handling_3.f90 eor_handling_4.f90
eor_handling_5.f90 noadv_size.f90
pad_no.f90
Log message:
2005-04-10 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/17992
PR libfortran/19568
PR libfortran/19595
PR libfortran/20005
PR libfortran/20092
PR libfortran/20131
PR libfortran/20138
PR libfortran/20661
PR libfortran/20744
* io/transfer.c (top level): eor_condition: New static variable.
(read_sf): Remove unnecessary zeroing of buffer (there is enough
information in its length).
Return a string of length 0 (to be padded by caller) if EOR was
seen previously.
Remove erroneous special casing of EOR for standard input.
Set eor_condition for non-advancing I/O if an end of line was
detected.
Increment ioparm.size if necessary.
(formatted_transfer): Skip the function if there is an EOR condition.
(data_transfer_init): Initialize eor_condition to zero (false).
(next_record_r): Clear sf_seen_eor if a \n has been seen already.
(finalize_transfer): If there is an EOR condition, raise the error.
2005-04-10 Thomas Koenig <Thomas.Koenig@online.de>
* eor_handling_1.f90: New test case.
* eor_handling_2.f90: New test case.
* eor_handling_3.f90: New test case.
* eor_handling_4.f90: New test case.
* eor_handling_5.f90: New test case.
* noadv_size.f90: New test case.
* pad_no.f90: New test case.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.188&r2=1.189
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/transfer.c.diff?cvsroot=gcc&r1=1.35&r2=1.36
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5320&r2=1.5321
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_1.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_2.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_3.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_4.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_5.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/noadv_size.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pad_no.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] console input doesn't deal correctly with CR
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
` (5 preceding siblings ...)
2005-04-10 8:38 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-10 8:41 ` tkoenig at gcc dot gnu dot org
2005-05-03 19:41 ` [Bug libfortran/20092] [4.0 only] " cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-04-10 8:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tkoenig at gcc dot gnu dot org 2005-04-10 08:41 -------
Fixed in 4.1.0, waiting for 4.0 to reopen.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
Known to work| |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] [4.0 only] console input doesn't deal correctly with CR
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
` (6 preceding siblings ...)
2005-04-10 8:41 ` tkoenig at gcc dot gnu dot org
@ 2005-05-03 19:41 ` cvs-commit at gcc dot gnu dot org
2005-05-03 19:47 ` tkoenig at gcc dot gnu dot org
2005-06-05 7:44 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-03 19:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-03 19:40 -------
Subject: Bug 20092
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: tkoenig@gcc.gnu.org 2005-05-03 19:39:36
Modified files:
libgfortran : ChangeLog
libgfortran/io : transfer.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gfortran.dg: eor_handling_1.f90 eor_handling_2.f90
eor_handling_3.f90 eor_handling_4.f90
eor_handling_5.f90 noadv_size.f90
pad_no.f90
Log message:
2005-05-03 Thomas Koenig <Thomas.Koenig@online.de>
Backport from mainline:
PR libfortran/17992
PR libfortran/19568
PR libfortran/19595
PR libfortran/20005
PR libfortran/20092
PR libfortran/20131
PR libfortran/20661
PR libfortran/20744
* io/transfer.c (top level): eor_condition: New static variable.
(read_sf): Remove unnecessary zeroing of buffer (there is enough
information in its length).
Return a string of length 0 (to be padded by caller) if EOR was
seen previously.
Remove erroneous special casing of EOR for standard input.
Set eor_condition for non-advancing I/O if an end of line was
detected.
Increment ioparm.size if necessary.
(formatted_transfer): Skip the function if there is an EOR condition.
(data_transfer_init): Initialize eor_condition to zero (false).
(next_record_r): Clear sf_seen_eor if a \n has been seen already.
(finalize_transfer): If there is an EOR condition, raise the error.
2005-05-03 Thomas Koenig <Thomas.Koenig@online.de>
Backport from mainline:
* eor_handling_1.f90: New test case.
* eor_handling_2.f90: New test case.
* eor_handling_3.f90: New test case.
* eor_handling_4.f90: New test case.
* eor_handling_5.f90: New test case.
* noadv_size.f90: New test case.
* pad_no.f90: New test case.
Patches:
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.22&r2=1.163.2.23
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.2.2&r2=1.32.2.3
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.156&r2=1.5084.2.157
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_1.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_2.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_3.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_4.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/eor_handling_5.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/noadv_size.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/pad_no.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.6.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] [4.0 only] console input doesn't deal correctly with CR
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
` (7 preceding siblings ...)
2005-05-03 19:41 ` [Bug libfortran/20092] [4.0 only] " cvs-commit at gcc dot gnu dot org
@ 2005-05-03 19:47 ` tkoenig at gcc dot gnu dot org
2005-06-05 7:44 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-05-03 19:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tkoenig at gcc dot gnu dot org 2005-05-03 19:47 -------
Patch committed to 4.0.1. Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libfortran/20092] [4.0 only] console input doesn't deal correctly with CR
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
` (8 preceding siblings ...)
2005-05-03 19:47 ` tkoenig at gcc dot gnu dot org
@ 2005-06-05 7:44 ` pinskia at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-05 7:44 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20092
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-06-05 7:44 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-20 3:04 [Bug fortran/20092] New: gfortran not correctly padding keyboard or text file input dir at lanl dot gov
2005-02-20 3:09 ` [Bug libfortran/20092] " pinskia at gcc dot gnu dot org
2005-02-20 17:01 ` Thomas dot Koenig at online dot de
2005-02-22 0:33 ` pinskia at gcc dot gnu dot org
2005-03-13 18:56 ` [Bug libfortran/20092] console input doesn't deal correctly with CR tobi at gcc dot gnu dot org
2005-03-13 21:10 ` Thomas dot Koenig at online dot de
2005-04-10 8:38 ` cvs-commit at gcc dot gnu dot org
2005-04-10 8:41 ` tkoenig at gcc dot gnu dot org
2005-05-03 19:41 ` [Bug libfortran/20092] [4.0 only] " cvs-commit at gcc dot gnu dot org
2005-05-03 19:47 ` tkoenig at gcc dot gnu dot org
2005-06-05 7:44 ` 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).