1 /* Test that exact underflow in __float128 signals the underflow
2 exception if trapping is enabled, but does not raise the flag
5 /* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* ia64-*-*gnu* } } */
6 /* { dg-options "-D_GNU_SOURCE" } */
7 /* { dg-require-effective-target fenv_exceptions } */
14 volatile sig_atomic_t caught_sigfpe
;
18 handle_sigfpe (int sig
)
27 volatile __float128 a
= 0x1p
-16382q
, b
= 0x1p
-2q
;
28 volatile __float128 r
;
30 if (fetestexcept (FE_UNDERFLOW
))
34 feenableexcept (FE_UNDERFLOW
);
35 signal (SIGFPE
, handle_sigfpe
);
36 if (sigsetjmp (buf
, 1) == 0)