1 /* PR c/51628. */
2 /* { dg-do compile } */
3 /* { dg-options "-O" } */
4
5 struct A
6 {
7 int i;
8 };
9
10 struct B
11 {
12 char c;
13 __attribute ((packed)) struct A ar[4];
14 /* { dg-warning "attribute ignored" "" { target default_packed } .-1 } */
15 };
16
17 struct B b;
18
19 int *p = &b.ar[1].i;
20 /* { dg-warning "may result in an unaligned pointer value" "" { target { ! default_packed } } .-1 } */