Another Fortran compiler bug
axt654 at csc.anu.oz.au
axt654 at csc.anu.oz.au
Mon Nov 5 21:22:18 AEST 1990
Here is a Fortran compiler bug along the lines of the C compiler bug talked
about recently. If the following program is run
program bug_ger
real*8 a
do 10 a=9000.d0,11000.d0,1000.d0
write(*,999) a,
10 continue
stop
999 format(G13.5)
end
then we get
9000.0
1000.
11000.
The problem is that it can't print the number 10000.0 with the format G13.5.
The real cute thing about this bug though is that it replaces the 0 off the end
of 10000.0 with a NULL. This means that with editors like MicroEmacs the whole
of the rest of the line is wiped, but can be retrieved by converting the NULL
to a zero where necessary (I wrote a C utility to do this - I had a few hundred
data files with 10000.0 in them, or rather not in them....). BTW I am using
Ultrix with f77 linked to fcom2.31.
I wonder if this bug is related to the C compilers printf bug?
Andrew Tridgell
tridge at aerodec.anu.edu.au
More information about the Comp.unix.ultrix
mailing list