libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / bitint-97.c
bloba859978933101d7bd9bdc93d25574cfe7c89e1b5
1 /* PR middle-end/114209 */
2 /* { dg-do compile { target bitint } } */
3 /* { dg-options "-Og -std=c23 -fno-strict-aliasing" } */
4 /* { dg-add-options float128 } */
5 /* { dg-require-effective-target float128 } */
7 typedef signed char V __attribute__((__vector_size__(16)));
8 typedef _Float128 W __attribute__((__vector_size__(16)));
10 _Float128
11 foo (void *p)
13 signed char c = *(_BitInt(128) *) p;
14 _Float128 f = *(_Float128 *) p;
15 W w = *(W *) p;
16 signed char r = ((union { W a; signed char b[16]; }) w).b[1];
17 return r + f;