Debugging Options - The GNU Fortran Compiler (original) (raw)

Specify a list of floating point exception traps to enable. On most systems, if a floating point exception occurs and the trap for that exception is enabled, a SIGFPE signal will be sent and the program being aborted, producing a core file useful for debugging. listis a (possibly empty) comma-separated list of the following exceptions: `invalid' (invalid floating point operation, such asSQRT(-1.0)), `zero' (division by zero), `overflow' (overflow in a floating point operation), `underflow' (underflow in a floating point operation), `inexact' (loss of precision during operation), and `denormal' (operation performed on a denormal value). The first five exceptions correspond to the five IEEE 754 exceptions, whereas the last one (`denormal') is not part of the IEEE 754 standard but is available on some common architectures such as x86.

The first three exceptions (`invalid', `zero', and `overflow') often indicate serious errors, and unless the program has provisions for dealing with these exceptions, enabling traps for these three exceptions is probably a good idea.

Many, if not most, floating point operations incur loss of precision due to rounding, and hence the ffpe-trap=inexact is likely to be uninteresting in practice.

By default no exception traps are enabled.