Debian Codegraph @

gcc/testsuite/c-c++-common/builtin-clear-padding-3.c

raw
1 /* PR middle-end/97943 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
4
5 union U { int a; char b[] __attribute__((aligned (2 * sizeof (int)))); };
6 struct V { int a; union U b; };
7
8 void
9 foo (union U *u, struct V *v)
10 {
11 __builtin_clear_padding (u); /* { dg-error "flexible array member" "does not have well defined padding bits" } */
12 __builtin_clear_padding (v); /* { dg-error "flexible array member" "does not have well defined padding bits" } */
13 }