aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/cxxbitfields-4.c
blob: a2d55f4a8c4fbb688d9e58d24833a6d650ad732d (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-not "movl" } } */