| 1 |
/* PR middle-end/43374 */ |
| 2 |
/* { dg-options "-O2" } */ |
| 3 |
|
| 4 |
__attribute__((noipa)) int |
| 5 |
foo (_Decimal32 x) |
| 6 |
{ |
| 7 |
return __builtin_isinf (x); |
| 8 |
} |
| 9 |
|
| 10 |
__attribute__((noipa)) int |
| 11 |
bar (_Decimal64 x) |
| 12 |
{ |
| 13 |
return __builtin_isfinite (x); |
| 14 |
} |
| 15 |
|
| 16 |
__attribute__((noipa)) int |
| 17 |
baz (_Decimal128 x) |
| 18 |
{ |
| 19 |
return __builtin_isnormal (x); |
| 20 |
} |
| 21 |
|
| 22 |
int |
| 23 |
main () |
| 24 |
{ |
| 25 |
if (!foo (__builtin_infd32 ()) |
| 26 |
|| !foo (-__builtin_infd32 ()) |
| 27 |
|| foo (__builtin_nand32 ("")) |
| 28 |
|| foo (9.999999E96DF) |
| 29 |
|| foo (-1E-95DF) |
| 30 |
|| foo (0.999999E-95DF) |
| 31 |
|| foo (-0.000001E-95DF) |
| 32 |
|| foo (0.000DF) |
| 33 |
|| foo (-0.00000DF)) |
| 34 |
__builtin_abort (); |
| 35 |
if (bar (__builtin_infd64 ()) |
| 36 |
|| bar (-__builtin_infd64 ()) |
| 37 |
|| bar (__builtin_nand64 ("")) |
| 38 |
|| !bar (9.999999999999999E384DD) |
| 39 |
|| !bar (-1E-383DD) |
| 40 |
|| !bar (0.999999999999999E-383DD) |
| 41 |
|| !bar (-0.000000000000001E-383DD) |
| 42 |
|| !bar (0.000DD) |
| 43 |
|| !bar (-0.0000000000DD)) |
| 44 |
__builtin_abort (); |
| 45 |
if (baz (__builtin_infd128 ()) |
| 46 |
|| baz (-__builtin_infd128 ()) |
| 47 |
|| baz (__builtin_nand128 ("")) |
| 48 |
|| !baz (9.999999999999999999999999999999999E6144DL) |
| 49 |
|| !baz (-1E-6143DL) |
| 50 |
|| baz (0.999999999999999999999999999999999E-6143DL) |
| 51 |
|| baz (-0.000000000000000000000000000000001E-6143DL) |
| 52 |
|| baz (0.000DL) |
| 53 |
|| baz (-0.0000000000000000000000DL)) |
| 54 |
__builtin_abort (); |
| 55 |
} |