Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.target / aarch64 / volatile-bitfields-2.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 typedef struct {
5   volatile unsigned long a:8;
6   volatile unsigned long b:8;
7   volatile unsigned long c:16;
8 } BitStruct;
9
10 BitStruct bits;
11
12 unsigned long foo ()
13 {
14   return bits.b;
15 }
16
17 /* { dg-final { scan-assembler "ldr\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" } } */