F77 Optimizer problem

Dave Seaman ags at s.cc.purdue.edu
Sun Mar 6 07:45:31 AEST 1988


In article <12147 at brl-adm.ARPA> jmleonar at crdec-vax2.arpa (jle) writes:
>Folks, for those who answered my recent post regarding linking C
>and F77 routines, thanks, it let me finish the job fast.  Now, there
>seems to be a small problem with the -O switch of the F77 compiler,
>namely the code bombs horribly when it's used.
>
>To be explicit, the code compiles without the -O flag, and the resulting
>program runs correctly ...

It may very well be that your problem is faulty optimization, but
that is not the only possible explanation.  The fact that the program
apparently "runs correctly" without optimization does not prove that the 
program is correct.

I constantly encounter faulty programs that appear to "run correctly" in one
environment (optimization level, compiler, machine) and fail in a different
environment.  It is tempting to assume that the processor is at fault, but
that is frequently not the case.  

If it were my program, I would want to find out what is wrong before
trusting ANY answers that it computes.

-- 
Dave Seaman	  					
ags at j.cc.purdue.edu



More information about the Comp.unix.questions mailing list