| 1 |
/* PR tree-optimization/113783 */ |
| 2 |
/* { dg-do compile { target bitint } } */ |
| 3 |
/* { dg-options "-O2" } */ |
| 4 |
/* { dg-additional-options "-mavx512f" { target i?86-*-* x86_64-*-* } } */ |
| 5 |
|
| 6 |
int i; |
| 7 |
|
| 8 |
#if __BITINT_MAXWIDTH__ >= 246 |
| 9 |
void |
| 10 |
foo (void *p, _BitInt(246) x) |
| 11 |
{ |
| 12 |
__builtin_memcpy (p, &x, sizeof x); |
| 13 |
} |
| 14 |
|
| 15 |
_BitInt(246) |
| 16 |
bar (void *p, _BitInt(246) x) |
| 17 |
{ |
| 18 |
_BitInt(246) y = x + 1; |
| 19 |
__builtin_memcpy (p, &y, sizeof y); |
| 20 |
return x; |
| 21 |
} |
| 22 |
#endif |
| 23 |
|
| 24 |
#if __BITINT_MAXWIDTH__ >= 502 |
| 25 |
void |
| 26 |
baz (void *p, _BitInt(502) x) |
| 27 |
{ |
| 28 |
__builtin_memcpy (p, &x, sizeof x); |
| 29 |
} |
| 30 |
|
| 31 |
_BitInt(502) |
| 32 |
qux (void *p, _BitInt(502) x) |
| 33 |
{ |
| 34 |
_BitInt(502) y = x + 1; |
| 35 |
__builtin_memcpy (p, &y, sizeof y); |
| 36 |
return x; |
| 37 |
} |
| 38 |
#endif |