summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/volatile-bitfields-1.c
blob: c519419ccf9412775d7acfb6a0159b26a8ede954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-require-effective-target arm_eabi } */
/* { dg-do compile } */
/* { dg-options "-O2" } */

typedef struct {
  char a:1;
  char b:7;
  int c;
} BitStruct;

volatile BitStruct bits;

int foo ()
{
  return bits.b;
}

/* { dg-final { scan-assembler "ldrb\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" } } */