7.3.5 _gfortran_set_fpe — Enable floating point exception traps
- Description:
-
_gfortran_set_fpe
enables floating point exception traps for the specified exceptions. On most systems, this will result in a SIGFPE signal being sent and the program being aborted. - Syntax:
-
void _gfortran_set_fpe (int val)
- Arguments:
-
option[0] IEEE exceptions. Possible values are (bitwise or-ed) zero (0, default) no trapping, GFC_FPE_INVALID
(1),GFC_FPE_DENORMAL
(2),GFC_FPE_ZERO
(4),GFC_FPE_OVERFLOW
(8),GFC_FPE_UNDERFLOW
(16), andGFC_FPE_INEXACT
(32). - Example:
-
int main (int argc, char *argv[]) { /* Initialize libgfortran. */ _gfortran_set_args (argc, argv); /* FPE for invalid operations such as SQRT(-1.0). */ _gfortran_set_fpe (1); return 0; }
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gfortran/_005fgfortran_005fset_005ffpe.html