Debian Codegraph @

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

raw
1 /* PR tree-optimization/112880 */
2 /* { dg-do compile { target bitint } } */
3 /* { dg-options "-std=c23 -O2" } */
4
5 #if __BITINT_MAXWIDTH__ >= 1024
6 _BitInt(1024) a, b, c, d, e, f;
7
8 void
9 foo (void)
10 {
11 __builtin_add_overflow (a, b, &a);
12 __builtin_sub_overflow (c, d, &c);
13 __builtin_mul_overflow (e, f, &e);
14 }
15 #endif
16
17 #if __BITINT_MAXWIDTH__ >= 512
18 _BitInt(512) g, h, i, j, k, l;
19
20 void
21 bar (void)
22 {
23 __builtin_add_overflow (g, h, &g);
24 __builtin_sub_overflow (i, j, &i);
25 __builtin_mul_overflow (k, l, &k);
26 }
27 #endif
28
29 _BitInt(32) m, n, o, p, q, r;
30
31 void
32 baz (void)
33 {
34 __builtin_add_overflow (m, n, &m);
35 __builtin_sub_overflow (o, p, &o);
36 __builtin_mul_overflow (q, r, &q);
37 }