Debian Codegraph @

gcc/testsuite/gcc.dg/bitint-91.c

raw
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-*-* } } */
5
6 int i;
7
8 #if __BITINT_MAXWIDTH__ >= 256
9 void
10 foo (void *p, _BitInt(256) x)
11 {
12 __builtin_memcpy (p, &x, sizeof x);
13 }
14
15 _BitInt(256)
16 bar (void *p, _BitInt(256) 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__ >= 512
25 void
26 baz (void *p, _BitInt(512) x)
27 {
28 __builtin_memcpy (p, &x, sizeof x);
29 }
30
31 _BitInt(512)
32 qux (void *p, _BitInt(512) x)
33 {
34 _BitInt(512) y = x + 1;
35 __builtin_memcpy (p, &y, sizeof y);
36 return x;
37 }
38 #endif