libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr114121.c
blob9a6ddf2957e11195dc82466c7d29c8f0f6f3f2ef
1 /* { dg-do run { target bitint } } */
3 #if __BITINT_MAXWIDTH__ >= 256
4 unsigned a, b, c, d, e;
5 unsigned _BitInt(256) f;
7 __attribute__((noipa)) unsigned short
8 bswap16 (int t)
10 return __builtin_bswap16 (t);
13 void
14 foo (unsigned z, unsigned _BitInt(512) y, unsigned *r)
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;
23 #endif
25 int
26 main ()
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;