comparison gcc/testsuite/gcc.dg/20141029-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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" } } */