| 1 |
/* PR tree-optimization/68835 */ |
| 2 |
/* { dg-do run { target int128 } } */ |
| 3 |
/* { dg-options "-fno-tree-forwprop -fno-tree-ccp -O1 -fno-tree-dominator-opts -fno-tree-fre" } */ |
| 4 |
|
| 5 |
__attribute__((noinline, noclone)) unsigned __int128 |
| 6 |
foo (void) |
| 7 |
{ |
| 8 |
unsigned __int128 x = (unsigned __int128) 0xffffffffffffffffULL; |
| 9 |
struct { unsigned __int128 a : 65; } w; |
| 10 |
w.a = x; |
| 11 |
w.a += x; |
| 12 |
return w.a; |
| 13 |
} |
| 14 |
|
| 15 |
int |
| 16 |
main () |
| 17 |
{ |
| 18 |
unsigned __int128 x = foo (); |
| 19 |
if ((unsigned long long) x != 0xfffffffffffffffeULL |
| 20 |
|| (unsigned long long) (x >> 64) != 1) |
| 21 |
__builtin_abort (); |
| 22 |
return 0; |
| 23 |
} |