fortran/1832: -list directed i/o overflow hangs, -fbounds-check doesn't detect

Robert.C.Haskell@rolls-royce.com Robert.C.Haskell@rolls-royce.com
Sun Apr 1 00:00:00 GMT 2001


>Number:         1832
>Category:       fortran
>Synopsis:       -list directed i/o overflow hangs, -fbounds-check doesn't detect
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 01 10:26:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Bob Haskell
>Release:        g77 version 2.95.3 19991030 (prerelease)
>Organization:
>Environment:
(from FSF-g77 version 0.5.25 19991030 (prerelease))
Driving: g77 -v t.f -o t -lg2c -lm
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/specs
gcc version 2.95.3 19991030 (prerelease)
 /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/f771 t.f -quiet -dumpbase
t.f -version -fversion -o /tmp/ccHM9EZy.s
GNU F77 version 2.95.3 19991030 (prerelease) (i586-mandrake-linux)
compiled by GNU C version 2.95.3 19991030 (prerelease).
GNU Fortran Front End version 0.5.25 19991030 (prerelease)
 as -V -Qy -o /tmp/ccebCcp0.o /tmp/ccHM9EZy.s
GNU assembler version 2.10.90 (i586-mandrake-linux) using BFD version
2.10.0.24
 /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/collect2 -m elf_i386
-dynamic-linker /lib/ld-linux.so.2 -o t /usr/lib/crt1.o /usr/lib/crti.o
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/crtbegin.o
-L/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3
-L/usr/i586-mandrake-linux/lib /tmp/ccebCcp0.o -lg2c -lm -lgcc -lc -lgcc
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/crtend.o /usr/lib/crtn.o

>Description:
The following program has a coding mistake - internal i/o overflow in
the write statement.  This program will generate a runtime error message
when compiled with the HP-UX and AIX fortran compilers.  When compiled
using g77, program execution will hang at the write statement. 
Compiling with the -fbounds-check has no effect.  If the format is
changed to "(2a)", then the program will run without any messages.  But
it ought to generate a runtime error about the overflow, at least when
compiled with -fbounds-check.
>How-To-Repeat:

      implicit none

      character*120 file
      character*5 string

      file = "c:/dos/adir/bdir/cdir/text.doc"

      write( string, * ) "a ", file
      print *, string

      stop
      end

>Fix:
not known
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-prs mailing list