24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

-qflttrap Option<br />

Syntax<br />

-qflttrap[=suboptions] | -qnoflttrap<br />

FLTTRAP[(suboptions)] | NOFLTTRAP<br />

Determines what types of floating-point exception conditions to detect at run time.<br />

The program receives a SIGTRAP signal when the corresponding exception<br />

occurs.<br />

Arguments<br />

ENable<br />

IMPrecise<br />

INEXact<br />

INValid<br />

NANQ<br />

OVerflow<br />

UNDerflow<br />

ZEROdivide<br />

Turn on checking <strong>for</strong> the specified exceptions in the main program<br />

so that the exceptions generate SIGTRAP signals. You must specify<br />

this suboption if you want to turn on exception trapping without<br />

modifying your source code.<br />

Only check <strong>for</strong> the specified exceptions on subprogram entry and<br />

exit. This suboption improves per<strong>for</strong>mance, but it can make the<br />

exact spot of the exception difficult to find.<br />

Detect and trap on floating-point inexact if exception-checking is<br />

enabled. Because inexact results are very common in floating-point<br />

calculations, you usually should not need to turn this type of<br />

exception on.<br />

Detect and trap on floating-point invalid operations if<br />

exception-checking is enabled.<br />

Detect and trap all quiet not-a-number values (NaNQs) and<br />

signaling not-a-number values (NaNSs). Trapping code is<br />

generated regardless of specifying the enable or imprecise<br />

suboption. This suboption detects all NaN values handled by or<br />

generated by floating point instructions, including those not<br />

created by invalid operations. This option can impact per<strong>for</strong>mance.<br />

Detect and trap on floating-point overflow if exception-checking is<br />

enabled.<br />

Detect and trap on floating-point underflow if exception-checking<br />

is enabled.<br />

Detect and trap on floating-point division by zero if<br />

exception-checking is enabled.<br />

Defaults<br />

The -qflttrap option without suboptions is equivalent to<br />

-qflttrap=ov:und:zero:inv:inex. However, because this default does not include<br />

enable, it is probably only useful if you already use fpsets or similar subroutines<br />

in your source. If you specify -qflttrap more than once, both with and without<br />

suboptions, the -qflttrap without suboptions is ignored.<br />

Restrictions<br />

On <strong>AIX</strong> Version 5.1 and above, if you use -qflttrap=inv:en to compile a program<br />

containing an IEEE invalid SQRT operation and then run that program, the<br />

expected SIGTRAP signal may not occur on PowerPC machines and does not<br />

occur at all on POWER machines.<br />

You can only fix this problem <strong>for</strong> <strong>AIX</strong> Version 5.1 and subsequent levels of the<br />

operating system. Specify the following command:<br />

<strong>XL</strong> <strong>Fortran</strong> Compiler-Option Reference 165

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!