libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / bitint-106.c
bloba36e88366900dee4d1723656b1ab7d1782ec8f63
1 /* PR tree-optimization/115337 */
2 /* { dg-do run { target bitint } } */
3 /* { dg-options "-O2" } */
5 #if __BITINT_MAXWIDTH__ >= 129
6 #define N 128
7 #else
8 #define N 63
9 #endif
11 _BitInt (N) g;
12 int c;
14 void
15 foo (unsigned _BitInt (N + 1) z, _BitInt (N) *ret)
17 c = __builtin_stdc_first_leading_one (z << N);
18 _BitInt (N) y = *(_BitInt (N) *) __builtin_memset (&g, c, 5);
19 *ret = y;
22 int
23 main ()
25 _BitInt (N) x;
26 foo (0, &x);
27 if (c || g || x)
28 __builtin_abort ();