aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr55750.c
blob: d2b3c63cd04e68e84933ed1c7e58d50cb4aaa4a1 (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
28
29
/* PR middle-end/55750 */

extern void abort (void);

struct S
{
  int m : 1;
  int n : 7;
} arr[2];

__attribute__((noinline, noclone)) void
foo (unsigned i)
{
  arr[i].n++;
}

int
main ()
{
  arr[0].m = -1;
  arr[0].n = (1 << 6) - 1;
  arr[1].m = 0;
  arr[1].n = -1;
  foo (0);
  foo (1);
  if (arr[0].m != -1 || arr[0].n != -(1 << 6) || arr[1].m != 0 || arr[1].n != 0)
    abort ();
  return 0;
}