summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr51628-21.c
blob: 0c7fab75d8ac3b1c21a2b94a062c9ee2a461abf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* PR c/51628.  */
/* { dg-do compile } */
/* { dg-options "-O -Wno-incompatible-pointer-types" } */

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

extern struct C p[];

long* g8 (void) { return p; }
/* { dg-warning "may result in an unaligned pointer value" "" { target *-*-* } .-1 } */