blob: 908c0b8cbf4c2086deb7a0cd649cf94c51d2ad65 [file] [log] [blame]
/* PR c/51628. */
/* { dg-do compile } */
/* { dg-options "-O" } */
struct A
{
int i;
};
struct B
{
char c;
__attribute ((packed)) struct A ar[4];
/* { dg-warning "attribute ignored" "" { target default_packed } .-1 } */
};
struct B b;
int *p = &b.ar[1].i;
/* { dg-warning "may result in an unaligned pointer value" "" { target { ! default_packed } } .-1 } */