aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr51628-22.c
blob: 25ac36cf0a2b588efda9c928b7cffbda5147ed79 (plain)
1
2
3
4
5
6
7
8
9
/* PR c/51628.  */
/* { dg-do compile } */
/* { dg-options "-O -Wno-incompatible-pointer-types" } */

struct B { int i; };
struct C { struct B b; } __attribute__ ((packed));

int* g4 (struct C *p) { return &p->b; }
/* { dg-warning "may result in an unaligned pointer value" "" { target { ! default_packed } } .-1 } */