HP-UX Floating-Point Guide
156 Chapter 6
Floating-Point Trap Handling
Enabling Traps
For example, if you use +fp_exception or +T to compile the program in
“Using the +FP Compiler Option” on page 153, it produces a result like
the following:
$ f77 +T overflow.f
overflow.f:
MAIN overflow:
$ ./a.out
PROGRAM ABORTED : IEEE overflow
PROCEDURE TRACEBACK:
( 0) 0x00003ad4 _start + 0x6c [./a.out]
The effect is similar with +fp_exception:
$ f90 +fp_exception overflow.f
overflow.f
program OVERFLOW
11 Lines Compiled
$ a.out
PROGRAM ABORTED : IEEE overflow
PROCEDURE TRACEBACK:
( 0) 0x00003ab0 _start + 0x58 [./a.out]
See “Command-Line Mode Control: The +FP Compiler Option” on
page 148 for information about how +fp_exception and +T interact
with +FP if you use them together. See the f90(1) man page and the HP
Fortran 90 Programmer’s Reference for details about using
+fp_exception. See the f77(1) man page and the HP FORTRAN/9000
Programmer’s Guide for details about using +T.