| 1 |
/* Test __float128 multiplication uses after-rounding tininess |
| 2 |
detection. */ |
| 3 |
|
| 4 |
/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */ |
| 5 |
/* { dg-options "" } */ |
| 6 |
/* { dg-require-effective-target fenv_exceptions } */ |
| 7 |
|
| 8 |
#include <fenv.h> |
| 9 |
#include <stdlib.h> |
| 10 |
|
| 11 |
int |
| 12 |
main (void) |
| 13 |
{ |
| 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); |
| 21 |
} |