111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-require-effective-target non_strict_align } */
|
|
3 /* { dg-options "-O2 -fdump-tree-store-merging-details" } */
|
|
4
|
|
5 /* Make sure stores to volatile addresses don't get combined with
|
|
6 other accesses. */
|
|
7
|
|
8 struct bar
|
|
9 {
|
|
10 int a;
|
|
11 char b;
|
|
12 char c;
|
|
13 volatile short d;
|
|
14 char e;
|
|
15 char f;
|
|
16 char g;
|
|
17 };
|
|
18
|
|
19 void
|
|
20 foozero (struct bar *p)
|
|
21 {
|
|
22 p->b = 0xa;
|
|
23 p->a = 0xb;
|
|
24 p->c = 0xc;
|
|
25 p->d = 0;
|
|
26 p->e = 0xd;
|
|
27 p->f = 0xe;
|
|
28 p->g = 0xf;
|
|
29 }
|
|
30
|
|
31 /* { dg-final { scan-tree-dump "Volatile access terminates all chains" "store-merging" } } */
|
|
32 /* { dg-final { scan-tree-dump-times "=\{v\} 0;" 1 "store-merging" } } */
|