summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/20150306-1.c
blob: 55caf3b93cedf4b8e778287214e00e047a3fa03c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do run } */
/* { dg-require-effective-target size32plus } */
/* { dg-options "-fstrict-volatile-bitfields" } */

struct s
{
  char x : 8;
  unsigned int y : 31;
} __attribute__((packed));

volatile struct s global;

int
main ()
{
  global.y = 0x7FFFFFFF;
  if (global.y != 0x7FFFFFFF)
    __builtin_abort ();
  return 0;
}