1 /* { dg-do compile } */
2 /* { dg-require-effective-target store_merge } */
3 /* { dg-options "-O2 -fdump-tree-store-merging" } */
4 
5 struct bar {
6   int a;
7   char b;
8   char c;
9   char d;
10   char e;
11   char f;
12   char g;
13 };
14 
15 void
foo1(struct bar * p)16 foo1 (struct bar *p)
17 {
18   p->b = 0;
19   p->a = 0;
20   p->c = 0;
21   p->d = 0;
22   p->e = 0;
23 }
24 
25 void
foo2(struct bar * p)26 foo2 (struct bar *p)
27 {
28   p->b = 0;
29   p->a = 0;
30   p->c = 1;
31   p->d = 0;
32   p->e = 0;
33 }
34 
35 /* { dg-final { scan-tree-dump-times "Merging successful" 2 "store-merging" } } */
36