This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/16805] New: Runtime failure using list directed read from string


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]