libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / bitint-91.c
blobede6f68c4aaf36fcf8cee2542df50314ce73ab76
1 /* PR tree-optimization/113988 */
2 /* { dg-do compile { target bitint } } */
3 /* { dg-options "-O2" } */
4 /* { dg-additional-options "-mavx512f" { target i?86-*-* x86_64-*-* } } */
6 int i;
8 #if __BITINT_MAXWIDTH__ >= 256
9 void
10 foo (void *p, _BitInt(256) x)
12 __builtin_memcpy (p, &x, sizeof x);
15 _BitInt(256)
16 bar (void *p, _BitInt(256) x)
18 _BitInt(246) y = x + 1;
19 __builtin_memcpy (p, &y, sizeof y);
20 return x;
22 #endif
24 #if __BITINT_MAXWIDTH__ >= 512
25 void
26 baz (void *p, _BitInt(512) x)
28 __builtin_memcpy (p, &x, sizeof x);
31 _BitInt(512)
32 qux (void *p, _BitInt(512) x)
34 _BitInt(512) y = x + 1;
35 __builtin_memcpy (p, &y, sizeof y);
36 return x;
38 #endif