This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization problems, how to obtain "processed source"?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]