[Bug fortran/26554] [gfortran] incorrect behaviour when reading a logical variable from a string

martin at mpa-garching dot mpg dot de gcc-bugzilla@gcc.gnu.org
Mon Mar 6 13:22:00 GMT 2006



------- Comment #9 from martin at mpa-garching dot mpg dot de  2006-03-06 13:22 -------
I just noticed another (probably related) problem:

The following Fortran code is derived from some autoconf test:

      PROGRAM TESTRECL
      IMPLICIT NONE

      OPEN(UNIT = 10,FILE = 'conftest.rcl1', FORM = 'UNFORMATTED',
     :  ACCESS = 'DIRECT', RECL = 1, ERR = 101)

         WRITE(UNIT=10,REC=1,ERR=101) 1d0
         PRINT *,"OK"
         STOP

 101     PRINT *,"error"

         CLOSE(UNIT=10, STATUS='DELETE')
      END


martin@linux:~/tmp> gfortran -v conf.f
Driving: gfortran -v conf.f -lgfortranbegin -lgfortran -lm -shared-libgcc
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/martin/software/gcc/configure --disable-multilib
--with-gmp=/home/martin/software/mygmp --with-mpfr=/home/martin/software/mympfr
--prefix=/home/martin/software/ugcc --enable-languages=c++,fortran
--enable-checking=release
Thread model: posix
gcc version 4.2.0 20060306 (experimental)
 /home/martin/software/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/f951
conf.f -ffixed-form -quiet -dumpbase conf.f -mtune=generic -auxbase conf
-version -I
/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/finclude -o
/tmp/ccS0dlhV.s
GNU F95 version 4.2.0 20060306 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.2.0 20060306 (experimental).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128005
 as -V -Qy -o /tmp/cciwdHBI.o /tmp/ccS0dlhV.s
GNU assembler version 2.16.91.0.2 (x86_64-suse-linux) using BFD version
2.16.91.0.2 20050720 (SuSE Linux)
 /home/martin/software/ugcc/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/collect2
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/crtbegin.o
-L/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.2.0
-L/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/../../..
/tmp/cciwdHBI.o -lgfortranbegin -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/home/martin/software/ugcc/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/crtend.o
/usr/lib/../lib64/crtn.o
martin@linux:~/tmp> ./a.out
At line 7 of file conf.f
Fortran runtime error: End of record


-- 


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



More information about the Gcc-bugs mailing list