aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr48124-2.c
blob: 485d8d4b553e3bd9b876a4bf61dee5b1d6598b2b (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
25
26
27
/* { dg-do run } */

extern void abort (void);

static volatile struct S0 {
    short f3[9];
    unsigned f8 : 15;
} s = {1};
static unsigned short sh = 0x1234;

struct S0 a, b;
int vi = 0;

void func_4()
{
  s.f8 |= 1;
  sh = 15;
  if (vi) a = b;
}

int main()
{
  func_4();
  if (sh != 15)
    abort ();
  return 0;
}