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

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