<font face="arial,helvetica,sans-serif"><br></font><br><div class="gmail_quote">On Thu, Nov 29, 2012 at 4:16 PM, Brad Sawatzky &lt;<a href="mailto:brads@jlab.org">brads@jlab.org</a>&gt; 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&#39;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&#39;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 &quot;-finit-local-zero&quot; flag is used (which can<br>
cause a performance hit), and/or use &quot;-Wall&quot; which should flag variables<br>
that get used without explicit initialization.<br></blockquote><div><br></div><div>Thanks Brad.  Looking at the &#39;make&#39; file (it&#39;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 &#39;pause&#39; statements (I cleaned up the old &#39;if&#39; 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>