summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr69990.c
blob: efb835ec1f8332b91e9f404d83fb23e6a710de43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do run } */
/* { dg-require-effective-target section_anchors } */
/* { dg-options "-O2 -fsection-anchors -ftree-loop-vectorize" } */

#pragma pack(1)
struct S0 {
  volatile int f0:12;
} static a[] = {{15}}, c[] = {{15}};

struct S0 b[] = {{7}};

int __attribute__ ((noinline, noclone))
ok (int a, int b, int c)
{
  return a == 15 && b == 7 && c == 15 ? 0 : 1;
}

int
main (void)
{
  struct S0 *f[] = { c, b };

  return ok (a[0].f0, b[0].f0, f[0]->f0);
}