PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / Wstrict-aliasing-struct-with-char-member.c
blob0da9a163781fda99510757e78b0b95150b9826af
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall" } */
4 struct a {
5 int i;
6 char c;
7 };
8 struct b {
9 float f;
10 float g;
12 int main(void)
14 static struct b b;
15 return ((struct a *)&b)->i; /* { dg-warning "will break strict-aliasing" } */