PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / store_merging_8.c
blobe710a544ff0591a53f2977c835265417ab0e4e4a
1 /* { dg-do compile } */
2 /* { dg-require-effective-target store_merge } */
3 /* { dg-options "-O2 -fdump-tree-store-merging" } */
5 struct baz {
6 struct bar {
7 int a;
8 char b;
9 char c;
10 char d;
11 char e;
12 char f;
13 char g;
14 } a[4];
15 } x;
16 struct baz *xx = &x;
18 void
19 foo1 (int i)
21 x.a[i].b = 0;
22 x.a[i].a = 0;
23 x.a[i].c = 0;
24 x.a[i].d = 0;
25 x.a[i].e = 0;
28 void
29 foo2 (int i)
31 x.a[i].b = 0;
32 x.a[i].a = 0;
33 x.a[i].c = 1;
34 x.a[i].d = 0;
35 x.a[i].e = 0;
38 /* { dg-final { scan-tree-dump-times "Merging successful" 2 "store-merging" } } */