2018-04-09 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20141029-1.c
blob4a5d92efa732e9b71f52b727af2d1d1cf05fc84d
1 /* { dg-do compile } */
2 /* { dg-options "-fstrict-volatile-bitfields -fdump-rtl-final" } */
4 #define PERIPH (*(volatile struct system_periph *)0x81234)
6 struct system_periph {
7 union {
8 unsigned short WORD;
9 struct {
10 unsigned short a:1;
11 unsigned short b:1;
12 unsigned short :5;
13 unsigned short c:1;
14 unsigned short :8;
15 } BIT;
16 } ALL;
17 } __attribute__((aligned(2)));
19 void
20 foo()
22 while (1)
24 PERIPH.ALL.BIT.a = 1;
27 /* { dg-final { scan-rtl-dump-times "mem/v(/.)*:HI" 4 "final" } } */