(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
pr51628-15.c
       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*
      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  }