aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/pr57344-3.c
blob: f9daea6d3a93afa923ddbef8a503950addd3e21e (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
/* PR middle-end/57344 */

struct __attribute__((packed)) S
{
  long long int a : 43;
  long long int b : 22;
  char c;
  long long int : 0;
} s[2];
int i;

__attribute__((noinline, noclone)) void
foo (long long int x)
{
  if (x != -3161LL)
    __builtin_abort ();
  asm volatile ("" : : : "memory");
}

int
main ()
{
  struct S t = { 0, -3161LL };
  s[1] = t;
  for (; i < 1; i++)
    foo (s[1].b);
  return 0;
}