Debian Codegraph @

gcc/testsuite/gcc.dg/c23-tag-composite-7.c

raw
1 /* { dg-do run }
2 * { dg-options "-std=c23" }
3 */
4
5 // bit-fields
6
7 struct foo { char (*y)[]; unsigned x:3; } x;
8
9 int main()
10 {
11 struct foo { char (*y)[1]; unsigned x:3; } y;
12
13 typeof(*(1 ? &x : &y)) a;
14 a.x = 8; /* { dg-warning "changes value" } */
15
16 if (a.x)
17 __builtin_abort();
18 }
19
20