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. Release: g77 version 2.95.3 19991030 (prerelease) 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 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
Responsible-Changed-From-To: unassigned->toon Responsible-Changed-Why: I analyzed it.
State-Changed-From-To: open->analyzed State-Changed-Why: It's a real bug, though no regression (has been wrong always).
From: toon@gcc.gnu.org To: Robert.C.Haskell@rolls-royce.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, toon@gcc.gnu.org Cc: Subject: Re: fortran/1832 Date: 6 Jun 2001 19:40:51 -0000 Synopsis: -list directed i/o overflow hangs, -fbounds-check doesn't detect Responsible-Changed-From-To: unassigned->toon Responsible-Changed-By: toon Responsible-Changed-When: Wed Jun 6 12:40:51 2001 Responsible-Changed-Why: I analyzed it. State-Changed-From-To: open->analyzed State-Changed-By: toon State-Changed-When: Wed Jun 6 12:40:51 2001 State-Changed-Why: It's a real bug, though no regression (has been wrong always). http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1832&database=gcc
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed by Bud Davis for GCC/g77 3.3 [ Sorry it took so long ]