decl.c (grok_ctor_properties): Use DECL_SOURCE_LOCATION.
[official-gcc.git] / gcc / testsuite / c-c++-common / pr51628-1.c
blob5324f9cc9647111ba61c1c34ecae3556e0419be7
1 /* PR c/51628. */
2 /* { dg-do compile } */
3 /* { dg-options "-O" } */
5 struct pair_t
7 int x;
8 int i;
9 } __attribute__((packed, aligned (4)));
11 extern struct pair_t p;
12 extern int *x;
13 extern void bar (int *);
15 int *addr = &p.i;
17 int *
18 foo (void)
20 struct pair_t arr[2] = { { 1, 10 }, { 2, 20 } };
21 int *p0, *p1;
22 p0 = &arr[0].i;
23 bar (p0);
24 p1 = &arr[1].i;
25 bar (p1);
26 bar (&p.i);
27 x = &p.i;
28 return &p.i;