1 /* PR c/51628.  */
2 /* { dg-do compile } */
3 /* { dg-options "-O" } */
4 
5 struct A {
6   int i;
7 } __attribute__ ((packed));
8 
9 int*
f(struct A * p,int * q)10 f (struct A *p, int *q)
11 {
12   return q ? q : &p->i;
13 /* { dg-warning "may result in an unaligned pointer value" "" { target { ! default_packed } } .-1 } */
14 }
15