optimization problems, how to obtain "processed source"?

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Oct 27 21:46:00 GMT 2006


On Fri, Oct 27, 2006 at 02:56:10PM +0200, Daniel Franke wrote:
> 
> I try to hunt down a problem with optimization. From my tests, it is
> to assume that a variable gets optimized away, that shouldn't. The
> main problem is, that adding WRITEs changes the behaviour of the
> compiled code, therefore I can't use them to debug.

If adding WRITEs changes the behavior of your code, then
this is a good indication of stepping on memory (ie.,
indexing arrays outside their range, using freed memory,
etc.).  Try adding -Wall and -fbounds-check to your
compiler options.

-- 
Steve



More information about the Fortran mailing list