PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / Wstrict-aliasing-bogus-upcast.c
blobcb70838809a7e1b9f11679537dda858cfee2c848
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall" } */
4 struct a {
5 int i;
6 };
7 struct b {
8 struct a a;
9 int j;
11 int main(void)
13 static struct b b;
14 struct a *ap=(struct a *)&b;
15 return ((struct b *)&ap->i)->j; /* { dg-bogus "will break strict-aliasing" } */