(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
pr51628-29.c
       1  /* PR c/51628.  */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O" } */
       4  
       5  struct A { int i; };
       6  struct B { struct A a; };
       7  struct C { struct B b __attribute__ ((packed)); };
       8  /* { dg-warning "attribute ignored" "" { target default_packed } .-1 } */
       9  
      10  extern struct C *p;
      11  
      12  int*
      13  g8 (void)
      14  {
      15    return &p->b.a.i;
      16  /* { dg-warning "may result in an unaligned pointer value" "" { target { ! default_packed } } .-1 } */
      17  }