Minor f77 bug
John D. McCalpin
mccalpin at perelandra.cms.udel.edu
Fri Aug 17 01:27:39 AEST 1990
I just found a minor bug related to over-zealous optimization. It
seems that the optimizer does not notice that variables written out
using a NAMELIST have been accessed. If they are not used anywhere
else, then they are silently deleted.
Therefore the following program (which I wrote to see what a NAMELIST
formatted file was supposed to look like) prints out all zeroes for
all of the namelist elements. Dropping optimization back to -O0
resulted in the correct output.
logical ident(4)
namelist /inparms/ ident,ntmes,nrst,nplt,nrrec,nmud,stepsperday
namelist /uparms/ saltup,saltdn,temptop,tempbot,transport
saltup=10.
saltdn=32.
temptop=25.
tempbot=25.
transport=-400.
stepsperday=360
ntmes=3600
nrst=1800
nplt=1800
nrrec=2
nmud=360
write(*,NML=inparms)
write(*,NML=uparms)
end
--
John D. McCalpin mccalpin at perelandra.cms.udel.edu
Assistant Professor mccalpin at vax1.udel.edu
College of Marine Studies, U. Del. J.MCCALPIN/OMNET
More information about the Comp.sys.sgi
mailing list