[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: g77 problems



> My FORTRAN program works fine using fort77 but fails due to
> Floating Exception when I use  g77 compiler.  I have been debugging
> this  program and when I insert  a write(*,*) statement
> in one of the subroutines the programs executes fine. I used
> xxgdb to debug the program and it showed problem in cosine  function
> (libm).

A floating point exception that comes and goes when you insert a
write(*,*) is usually a sign of an incorrect program. Different
compilers will then give different answers. Try turning on bounds
checking in fort77, etc, to try to find your bug. If you are
overwriting memory, writing an integer value into a floating point
variable sometimes produces a denormalized number, which results in
a crash on the alpha.

On the other hand, you may be really generating a denorm. In that
case compiling with g77 -mieee may be the fix. But in that case fort77
should also be showing a floating exception.

-- g



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []