| 1 |
/* PR middle-end/120547 */ |
| 2 |
/* { dg-do run { target bitint } } */ |
| 3 |
/* { dg-options "-O2" } */ |
| 4 |
/* { dg-add-options float64 } */ |
| 5 |
/* { dg-require-effective-target float64 } */ |
| 6 |
|
| 7 |
#define CHECK(x, y) \ |
| 8 |
if ((_Float64) x != (_Float64) y \ |
| 9 |
|| (_Float64) (x + 1) != (_Float64) (y + 1)) \ |
| 10 |
__builtin_abort () |
| 11 |
|
| 12 |
int |
| 13 |
main () |
| 14 |
{ |
| 15 |
unsigned long long a = 0x20000000000001ULL << 7; |
| 16 |
volatile unsigned long long b = a; |
| 17 |
CHECK (a, b); |
| 18 |
#if __BITINT_MAXWIDTH__ >= 4096 |
| 19 |
unsigned _BitInt(4096) c = ((unsigned _BitInt(4096)) 0x20000000000001ULL) << 253; |
| 20 |
volatile unsigned _BitInt(4096) d = c; |
| 21 |
CHECK (c, d); |
| 22 |
unsigned _BitInt(4096) e = ((unsigned _BitInt(4096)) 0x20000000000001ULL) << 931; |
| 23 |
volatile unsigned _BitInt(4096) f = e; |
| 24 |
CHECK (e, f); |
| 25 |
#endif |
| 26 |
} |