| 1 |
/* Test floating-point conversions. __float128 type with TImode: bug |
| 2 |
53317. */ |
| 3 |
/* Origin: Joseph Myers <[email protected]> */ |
| 4 |
/* { dg-do run } */ |
| 5 |
/* { dg-require-effective-target __float128 } */ |
| 6 |
/* { dg-require-effective-target base_quadfloat_support } */ |
| 7 |
/* { dg-require-effective-target int128 } */ |
| 8 |
/* { dg-options "" } */ |
| 9 |
/* { dg-add-options __float128 } */ |
| 10 |
|
| 11 |
extern void abort (void); |
| 12 |
extern void exit (int); |
| 13 |
|
| 14 |
int |
| 15 |
main (void) |
| 16 |
{ |
| 17 |
volatile unsigned long long a = 0x1000000000000ULL; |
| 18 |
volatile unsigned long long b = 0xffffffffffffffffULL; |
| 19 |
unsigned __int128 c = (((unsigned __int128) a) << 64) | b; |
| 20 |
__float128 d = c; |
| 21 |
if (d != 0x1.000000000000ffffffffffffffffp112q) |
| 22 |
abort (); |
| 23 |
exit (0); |
| 24 |
} |