Implement C _FloatN, _FloatNx types.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / float128-mul-underflow.c
blobe3ebfffc98f221cc0cbda51fde4edff8ba485e71
1 /* Test __float128 multiplication uses after-rounding tininess
2 detection. */
4 /* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
5 /* { dg-options "" } */
6 /* { dg-require-effective-target fenv_exceptions } */
8 #include <fenv.h>
9 #include <stdlib.h>
11 int
12 main (void)
14 volatile __float128 a = 0x1.fffffffffffffffp-16382q, b = 0x1.0000000000000008p-1q, c;
15 c = a * b;
16 if (fetestexcept (FE_UNDERFLOW))
17 abort ();
18 if (c != 0x1p-16382q)
19 abort ();
20 exit (0);