aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr51628-13.c
blob: b77e16c408f32f3e55fe6dfd9f954259ff72efdf (plain)
1
2
3
4
5
6
7
8
9
/* PR c/51628.  */
/* { dg-do compile } */
/* { dg-options "-O" } */

struct B { int i; };
struct C { struct B b; } __attribute__ ((packed));

int* h4 (struct C *p) { return &p->b.i; }
/* { dg-warning "may result in an unaligned pointer value" "" { target { ! default_packed } } .-1 } */