Debian Codegraph @

gcc/testsuite/c-c++-common/pr51628-27.c

raw
1 /* PR c/51628. */
2 /* { dg-do compile } */
3 /* { dg-options "-O" } */
4
5 struct A { int i; } __attribute__ ((packed));
6 struct B { struct A a; };
7 struct C { struct B b; };
8
9 extern struct C *p;
10
11 int* g8 (void) { return &p->b.a.i; }
12 /* { dg-warning "may result in an unaligned pointer value" "" { target { ! default_packed } } .-1 } */