Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!nigel.ee.udel.edu!mccalpin From: mccalpin@perelandra.cms.udel.edu (John D. McCalpin) Newsgroups: comp.sys.sgi Subject: Minor f77 bug Message-ID: Date: 16 Aug 90 15:27:39 GMT Sender: usenet@ee.udel.edu Organization: College of Marine Studies, U. Del. Lines: 35 Nntp-Posting-Host: perelandra.cms.udel.edu 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@perelandra.cms.udel.edu Assistant Professor mccalpin@vax1.udel.edu College of Marine Studies, U. Del. J.MCCALPIN/OMNET