1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-gimple" } */
3 
4 struct foo {
5         unsigned a1: 1;
6         unsigned a2: 3;
7         unsigned : 4;
8 };
9 
10 extern struct foo thefoo, theotherfoo;
11 
setup_foo(void)12 void setup_foo(void)
13 {
14         const struct foo init = {
15                 .a1 = 1,
16                 .a2 = 5,
17         };
18 	volatile const struct foo volinit = {
19 		.a1 = 0,
20 		.a2 = 6
21 	};
22         thefoo = init;
23 	theotherfoo = volinit;
24 }
25 
26 /* { dg-final { scan-tree-dump-times "thefoo.* = {}" 1 "gimple"} } */
27 /* { dg-final { scan-tree-dump-times "thefoo.* = 1" 1 "gimple"} } */
28 /* { dg-final { scan-tree-dump-times "thefoo.* = 5" 1 "gimple"} } */
29 /* { dg-final { scan-tree-dump-times "theotherfoo = volinit" 1 "gimple"} } */
30