| 1 |
/* PR tree-optimization/115337 */ |
| 2 |
/* { dg-do run { target bitint } } */ |
| 3 |
/* { dg-options "-O2" } */ |
| 4 |
|
| 5 |
#if __BITINT_MAXWIDTH__ >= 129 |
| 6 |
#define N 128 |
| 7 |
#else |
| 8 |
#define N 63 |
| 9 |
#endif |
| 10 |
|
| 11 |
_BitInt (N) g; |
| 12 |
int c; |
| 13 |
|
| 14 |
void |
| 15 |
foo (unsigned _BitInt (N + 1) z, _BitInt (N) *ret) |
| 16 |
{ |
| 17 |
c = __builtin_stdc_first_leading_one (z << N); |
| 18 |
_BitInt (N) y = *(_BitInt (N) *) __builtin_memset (&g, c, 5); |
| 19 |
*ret = y; |
| 20 |
} |
| 21 |
|
| 22 |
int |
| 23 |
main () |
| 24 |
{ |
| 25 |
_BitInt (N) x; |
| 26 |
foo (0, &x); |
| 27 |
if (c || g || x) |
| 28 |
__builtin_abort (); |
| 29 |
} |