Determines what types of floating-point exceptions to detect at run time.
The program receives a SIGFPE signal when the corresponding exception occurs.
.-noflttrap------------------------------. >>- -q--+-flttrap--+---------------------------+-+------------->< | .-:------------------. | | | .-ZEROdivide-. | | | | +-UNDerflow--+ | | | | +-OVerflow---+ | | | | +-INValid----+ | | | V +-INEXact----+ | | '-=------+-ENable-----+---+-' '-NANQ-------'
@PROCESS:
FLTTRAP[(suboptions)] | NOFLTTRAP
-qnoflttrap
Specifying -qflttrap option with no suboptions is equivalent to -qflttrap=invalid:inexact:overflow:undflow:zerodivide
Exceptions will be detected by the hardware, but trapping is not enabled. Because this default does not include enable, it is probably only useful if you already use fpsets or similar subroutines in your source.
If you specify -qflttrap more than once, both with and without suboptions, the -qflttrap without suboptions is ignored.
The -qflttrap option is recognized during linking with IPA. Specifying the option at the link step overrides the compile-time setting.
For full instructions on how and when to use the -qflttrap option, especially if you are just starting to use it, see the Detecting and trapping floating-point exceptions topic.
REAL :: x, y, z
DATA x /5.0/, y /0.0/
z = x / y
PRINT *, z
END
xlf -qflttrap=zerodivide:enable -qsigtrap divide_by_zero.f
The zerodivide suboption identifies the type of exception to guard against. The enable suboption causes a SIGFPE signal to be generated when the exception occurs. The -qsigtrap option produces informative output when the signal stops the program.