aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cxxbitfields-4.c
blob: 7023b31654a73ed6a1af795116028282ecf5d186 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 --param allow-store-data-races=0" } */

struct bits
{
  char a;
  int b:7;
  int c:9;
  unsigned char d;
} x;

/* Store into <c> should not clobber <d>.  */
void update_c(struct bits *p, int val) 
{
    p -> c = val;
}

/* { dg-final { scan-assembler "mov\[bw\]" } } */