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"?


2006/10/27, Steve Kargl <sgk@troutmask.apl.washington.edu>:
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.

Got it. An uninitialized variable that was used as RESULT of a function. Thanks for all your replies =)

Daniel


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