libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / bitint-98.c
blob1861b3650372f9f435ab6326ba8a4a096f205466
1 /* PR middle-end/114157 */
2 /* { dg-do compile { target bitint } } */
3 /* { dg-options "-O2 -std=c23 -Wno-psabi -w" } */
5 #if __BITINT_MAXWIDTH__ >= 256
6 _BitInt(256) d;
7 _BitInt(255) e;
9 void
10 foo (long __attribute__((vector_size (64))) s)
12 __builtin_memmove (&d, &s, sizeof (d));
15 void
16 bar (_BitInt(512) x)
18 long __attribute__((vector_size (64))) s;
19 __builtin_memcpy (&s, &x, sizeof (s));
20 __builtin_memcpy (&d, &s, sizeof (d));
23 void
24 baz (long __attribute__((vector_size (64))) s)
26 _BitInt(256) d;
27 __builtin_memmove (&d, &s, sizeof (d));
28 e = d;
31 void
32 qux (long __attribute__((vector_size (64))) s)
34 _BitInt(192) d;
35 __builtin_memmove (&d, &s, sizeof (d));
36 e = d;
38 #else
39 int i;
40 #endif
42 #if __BITINT_MAXWIDTH__ >= 1024
43 _BitInt(512)
44 corge (long __attribute__((vector_size (1024))) s)
46 _BitInt(512) d;
47 __builtin_memcpy (&d, &s, sizeof (d));
48 return d;
50 #endif