| 1 |
/* PR middle-end/114157 */ |
| 2 |
/* { dg-do compile { target bitint } } */ |
| 3 |
/* { dg-options "-O2 -std=c23 -Wno-psabi -w" } */ |
| 4 |
|
| 5 |
#if __BITINT_MAXWIDTH__ >= 256 |
| 6 |
_BitInt(256) d; |
| 7 |
_BitInt(255) e; |
| 8 |
|
| 9 |
void |
| 10 |
foo (long __attribute__((vector_size (64))) s) |
| 11 |
{ |
| 12 |
__builtin_memmove (&d, &s, sizeof (d)); |
| 13 |
} |
| 14 |
|
| 15 |
void |
| 16 |
bar (_BitInt(512) x) |
| 17 |
{ |
| 18 |
long __attribute__((vector_size (64))) s; |
| 19 |
__builtin_memcpy (&s, &x, sizeof (s)); |
| 20 |
__builtin_memcpy (&d, &s, sizeof (d)); |
| 21 |
} |
| 22 |
|
| 23 |
void |
| 24 |
baz (long __attribute__((vector_size (64))) s) |
| 25 |
{ |
| 26 |
_BitInt(256) d; |
| 27 |
__builtin_memmove (&d, &s, sizeof (d)); |
| 28 |
e = d; |
| 29 |
} |
| 30 |
|
| 31 |
void |
| 32 |
qux (long __attribute__((vector_size (64))) s) |
| 33 |
{ |
| 34 |
_BitInt(192) d; |
| 35 |
__builtin_memmove (&d, &s, sizeof (d)); |
| 36 |
e = d; |
| 37 |
} |
| 38 |
#else |
| 39 |
int i; |
| 40 |
#endif |
| 41 |
|
| 42 |
#if __BITINT_MAXWIDTH__ >= 1024 |
| 43 |
_BitInt(512) |
| 44 |
corge (long __attribute__((vector_size (1024))) s) |
| 45 |
{ |
| 46 |
_BitInt(512) d; |
| 47 |
__builtin_memcpy (&d, &s, sizeof (d)); |
| 48 |
return d; |
| 49 |
} |
| 50 |
#endif |