<font face="arial,helvetica,sans-serif"><br></font><br><div class="gmail_quote">On Thu, Nov 29, 2012 at 4:16 PM, Brad Sawatzky <<a href="mailto:brads@jlab.org">brads@jlab.org</a>> wrote:<br>
<blockquote class="gmail_quote"><br>
Oh yeah. The other scary bug in old code is associated with<br>
uninitialized variables. Older versions of fortran automagically<br>
initialized variables to zero -- I've run across old code that relied on<br>
this informal behaviour. As you might imagine, this can result in some<br>
weird indeterminate bugs on compilers that don't initialize by default<br>
(ie. all GNU compilers). The code execution can depend on whatever<br>
happened to be in in a given block of memory at allocation time.<br>
<br>
It is wise to make sure the "-finit-local-zero" flag is used (which can<br>
cause a performance hit), and/or use "-Wall" which should flag variables<br>
that get used without explicit initialization.<br></blockquote><div><br></div><div>Thanks Brad. Looking at the 'make' file (it's actually a bash script), it has -fbounds-check included. I added -Wall, which just showed me unused variables. Before using -Wall, I had just some warnings about obsolete 'pause' statements (I cleaned up the old 'if' statements). </div>
</div><div><br></div>-- <br>-----------------------------------------------------------<br>David Flay<br>Physics Department<br>Temple University<br>Philadelphia, PA 19122 <br><br>office: Barton Hall, BA319<br>phone: (215) 204-1331<br>
<br>e-mail: <a href="mailto:flay@jlab.org">flay@jlab.org</a> <br> <a href="mailto:flay@temple.edu">flay@temple.edu</a><br><br>website: <a href="http://www.jlab.org/%7Eflay">http://www.jlab.org/~flay</a><br>
<a href="http://quarks.temple.edu">http://quarks.temple.edu</a><br>-----------------------------------------------------------<br><br><br>