public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16805] New: Runtime failure using list directed read from string
@ 2004-07-28 17:59 aovb94 at dsl dot pipex dot com
  2004-07-29  0:22 ` [Bug libfortran/16805] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: aovb94 at dsl dot pipex dot com @ 2004-07-28 17:59 UTC (permalink / raw)
  To: gcc-bugs

Test code:

      PROGRAM rdch
!
      IMPLICIT NONE
!
      REAL                 :: fp
      CHARACTER (LEN = 10) :: ch
!
      ch = '    1     '
!
      WRITE (6,*) 'ch = ', ch
      READ (ch(5:5),*) fp
      WRITE (6,*) 'fp = ', fp
!
      STOP
      END

Produces runtime error:

At line 11 of file rdch.f95
Fortran runtime error: Inappropriate ioctl for device
 ch =     1     

Compilation output:

Driving: gfortran -v -Wall -save-temps -o rdch rdch.f95 -lgfortranbegin
-lgfortran -lm -shared-libgcc
Reading specs from /home/martin/GCC/usr/local/lib/gcc/i686-pc-linux-gnu/3.5.0/specs
Configured with: ../gcc/configure --prefix=/home/martin/GCC/usr/local :
(reconfigured) ../gcc/configure --prefix=/home/martin/GCC/usr/local
--enable-languages=f95 : (reconfigured) ../gcc/configure
--prefix=/home/martin/GCC/usr/local
--with-gcc-version-trigger=/home/martin/GCC/gcc/gcc/version.c
--enable-languages=c,f95 --no-create --no-recursion : (reconfigured)
../gcc/configure --prefix=/home/martin/GCC/usr/local --enable-languages=f95 :
(reconfigured) ../gcc/configure --prefix=/home/martin/GCC/usr/local
--with-gcc-version-trigger=/home/martin/GCC/gcc/gcc/version.c
--enable-languages=c,f95 --no-create --no-recursion : (reconfigured)
../gcc/configure --prefix=/home/martin/GCC/usr/local
--with-gcc-version-trigger=/home/martin/GCC/gcc/gcc/version.c
--enable-languages=c,f95 --no-create --no-recursion : (reconfigured)
../gcc/configure --prefix=/home/martin/GCC/usr/local --enable-languages=f95
Thread model: posix
gcc version 3.5.0 20040726 (experimental)
 /home/martin/GCC/usr/local/libexec/gcc/i686-pc-linux-gnu/3.5.0/f951 rdch.f95
-quiet -dumpbase rdch.f95 -mtune=pentiumpro -auxbase rdch -Wall -version -o rdch.s
GNU F95 version 3.5.0 20040726 (experimental) (i686-pc-linux-gnu)
	compiled by GNU C version 3.5.0 20040726 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
 as -V -Qy -o rdch.o rdch.s
GNU assembler version 2.15.90.0.3 (i386-redhat-linux) using BFD version
2.15.90.0.3 20040415
 /home/martin/GCC/usr/local/libexec/gcc/i686-pc-linux-gnu/3.5.0/collect2
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o rdch
/usr/lib/crt1.o /usr/lib/crti.o
/home/martin/GCC/usr/local/lib/gcc/i686-pc-linux-gnu/3.5.0/crtbegin.o
-L/home/martin/GCC/usr/local/lib/gcc/i686-pc-linux-gnu/3.5.0
-L/home/martin/GCC/usr/local/lib/gcc/i686-pc-linux-gnu/3.5.0/../../.. rdch.o
-lgfortranbegin -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/home/martin/GCC/usr/local/lib/gcc/i686-pc-linux-gnu/3.5.0/crtend.o /usr/lib/crtn.o

Similar code performs as expected for g77. Code known to work with SUN Workshop 6.

-- 
           Summary: Runtime failure using list directed read from string
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aovb94 at dsl dot pipex dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug libfortran/16805] Runtime failure using list directed read from string
  2004-07-28 17:59 [Bug fortran/16805] New: Runtime failure using list directed read from string aovb94 at dsl dot pipex dot com
@ 2004-07-29  0:22 ` pinskia at gcc dot gnu dot org
  2004-08-02  1:07 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-29  0:22 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|fortran                     |libfortran


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


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

* [Bug libfortran/16805] Runtime failure using list directed read from string
  2004-07-28 17:59 [Bug fortran/16805] New: Runtime failure using list directed read from string aovb94 at dsl dot pipex dot com
  2004-07-29  0:22 ` [Bug libfortran/16805] " pinskia at gcc dot gnu dot org
@ 2004-08-02  1:07 ` pinskia at gcc dot gnu dot org
  2004-08-13  2:17 ` bdavis at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-02  1:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-02 01:07 -------
Confirmed:
 ch =     1
At line 11 of file pr6805.f95
Fortran runtime error: No such device


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-02 01:07:47
               date|                            |


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


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

* [Bug libfortran/16805] Runtime failure using list directed read from string
  2004-07-28 17:59 [Bug fortran/16805] New: Runtime failure using list directed read from string aovb94 at dsl dot pipex dot com
  2004-07-29  0:22 ` [Bug libfortran/16805] " pinskia at gcc dot gnu dot org
  2004-08-02  1:07 ` pinskia at gcc dot gnu dot org
@ 2004-08-13  2:17 ` bdavis at gcc dot gnu dot org
  2004-08-29 16:10 ` bdavis at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-08-13  2:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2004-08-13 02:17 -------
There is really two problems here (so far):

First is problems reading into a substring, which
causes the device error reported above.

Second is reading list directed from an internal file:

[bdavis@localhost pr16805]$ cat a.f
      PROGRAM rdch
      REAL fp
      CHARACTER*10 ch
      ch = '  1'
!     READ (ch(5:5),*) fp
      READ (ch,*) fp
      STOP
      END
[bdavis@localhost pr16805]$ gfc a.f
[bdavis@localhost pr16805]$ ./a.out
At line 6 of file a.f
Fortran runtime error: Success

Two different bugs in one PR.  What a day !!

--bud davis

-- 


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


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

* [Bug libfortran/16805] Runtime failure using list directed read from string
  2004-07-28 17:59 [Bug fortran/16805] New: Runtime failure using list directed read from string aovb94 at dsl dot pipex dot com
                   ` (2 preceding siblings ...)
  2004-08-13  2:17 ` bdavis at gcc dot gnu dot org
@ 2004-08-29 16:10 ` bdavis at gcc dot gnu dot org
  2004-08-31 20:38 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2004-08-29 16:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bdavis at gcc dot gnu dot org  2004-08-29 16:10 -------
proposed patch:

http://gcc.gnu.org/ml/fortran/2004-08/msg00283.html

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


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


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

* [Bug libfortran/16805] Runtime failure using list directed read from string
  2004-07-28 17:59 [Bug fortran/16805] New: Runtime failure using list directed read from string aovb94 at dsl dot pipex dot com
                   ` (3 preceding siblings ...)
  2004-08-29 16:10 ` bdavis at gcc dot gnu dot org
@ 2004-08-31 20:38 ` cvs-commit at gcc dot gnu dot org
  2004-08-31 20:55 ` pbrook at gcc dot gnu dot org
  2004-08-31 20:56 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-08-31 20:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-08-31 20:38 -------
Subject: Bug 16805

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	pbrook@gcc.gnu.org	2004-08-31 20:37:43

Modified files:
	gcc/testsuite  : ChangeLog 
	libgfortran    : ChangeLog 
	libgfortran/io : list_read.c unix.c 
Added files:
	gcc/testsuite/gfortran.dg: list_read_2.f90 

Log message:
	PR libfortran/16805
	* io/list_read.c (next_char): Don't signal EOF for internal files.
	* io/unix.c (mem_alloc_r_at): Don't return NULL for incomplete reads.
	testsuite/
	2004-08-31  Bud Davis  <bdavis9659@comcast.net>
	
	* gfortran.dg/list_read_2.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4218&r2=1.4219
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/list_read_2.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.79&r2=1.80
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/list_read.c.diff?cvsroot=gcc&r1=1.7&r2=1.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/unix.c.diff?cvsroot=gcc&r1=1.8&r2=1.9



-- 


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


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

* [Bug libfortran/16805] Runtime failure using list directed read from string
  2004-07-28 17:59 [Bug fortran/16805] New: Runtime failure using list directed read from string aovb94 at dsl dot pipex dot com
                   ` (4 preceding siblings ...)
  2004-08-31 20:38 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-31 20:55 ` pbrook at gcc dot gnu dot org
  2004-08-31 20:56 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2004-08-31 20:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pbrook at gcc dot gnu dot org  2004-08-31 20:55 -------
Fixed. 

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


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


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

* [Bug libfortran/16805] Runtime failure using list directed read from string
  2004-07-28 17:59 [Bug fortran/16805] New: Runtime failure using list directed read from string aovb94 at dsl dot pipex dot com
                   ` (5 preceding siblings ...)
  2004-08-31 20:55 ` pbrook at gcc dot gnu dot org
@ 2004-08-31 20:56 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-31 20:56 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.5.0


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


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

end of thread, other threads:[~2004-08-31 20:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-28 17:59 [Bug fortran/16805] New: Runtime failure using list directed read from string aovb94 at dsl dot pipex dot com
2004-07-29  0:22 ` [Bug libfortran/16805] " pinskia at gcc dot gnu dot org
2004-08-02  1:07 ` pinskia at gcc dot gnu dot org
2004-08-13  2:17 ` bdavis at gcc dot gnu dot org
2004-08-29 16:10 ` bdavis at gcc dot gnu dot org
2004-08-31 20:38 ` cvs-commit at gcc dot gnu dot org
2004-08-31 20:55 ` pbrook at gcc dot gnu dot org
2004-08-31 20:56 ` 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).