111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-fstrict-volatile-bitfields -fdump-rtl-final" } */
|
|
3
|
|
4 #define PERIPH (*(volatile struct system_periph *)0x81234)
|
|
5
|
|
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)));
|
|
18
|
|
19 void
|
|
20 foo()
|
|
21 {
|
|
22 while (1)
|
|
23 {
|
|
24 PERIPH.ALL.BIT.a = 1;
|
|
25 }
|
|
26 }
|
|
27 /* { dg-final { scan-rtl-dump-times "mem/v(/.)*:HI" 4 "final" } } */
|