Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr114121.c

raw
1 /* { dg-do run { target bitint } } */
2
3 #if __BITINT_MAXWIDTH__ >= 256
4 unsigned a, b, c, d, e;
5 unsigned _BitInt(256) f;
6
7 __attribute__((noipa)) unsigned short
8 bswap16 (int t)
9 {
10 return __builtin_bswap16 (t);
11 }
12
13 void
14 foo (unsigned z, unsigned _BitInt(512) y, unsigned *r)
15 {
16 unsigned t = __builtin_sub_overflow_p (0, y << 509, f);
17 z *= bswap16 (t);
18 d = __builtin_sub_overflow_p (c, 3, (unsigned _BitInt(512)) 0);
19 unsigned q = z + c + b;
20 unsigned short n = q >> (8 + a);
21 *r = b + e + n;
22 }
23 #endif
24
25 int
26 main ()
27 {
28 #if __BITINT_MAXWIDTH__ >= 256
29 unsigned x;
30 foo (8, 2, &x);
31 if (x != 8)
32 __builtin_abort ();
33 #endif
34 return 0;
35 }