libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr113492.c
blob56296c510727cbc084bda6a0d7b58c657a94cc2d
1 /* PR 113492
2 * { dg-do compile }
3 * { dg-options "-std=c23 -funsigned-bitfields" } */
5 struct foo {
6 int i : 3;
7 } i;
9 void test()
11 struct foo {
12 unsigned i : 3;
13 } u;
15 1 ? i : u;
16 1 ? u : i;
19 struct bar {
20 unsigned i : 3;
21 } u;
23 void test2()
25 struct bar {
26 int i : 3;
27 } i;
29 1 ? i : u;
30 1 ? u : i;
33 void test3()
35 typedef int myint;
36 struct bar {
37 myint i : 3;
38 } i;
40 1 ? i : u;
41 1 ? u : i;