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]

-f[no-]finite-math-only


Dear all,

some Fortran77 code I inherited gives wrong results if compiled 
with '-ffast-math', especially with '-ffinite-math-only' enabled 
('-ffast-math -fno-finite-math-only' seems to work).

As '-ffinite-math-only' does "Allow optimizations for floating-point 
arithmetic that assume that arguments and results are not NaNs or +-Infs", it 
is to assume that the code uses either or both. If so, it's very likely that 
this was not intended by the original author.

Any pointers on how to track down these issues in ~25kloc of Fortran77 to 
double check what's going on?

Thanks


	Daniel


P.S. Not using '-ffast-math' would of course be an option, but knowing that 
there might be something fishy going on with NaN/Inf does not improve the 
confidence in the application's results ...


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