PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / store_merging_9.c
blob4c9f21ef62b522c3165aab5441a2c5dac58ee4fb
1 /* PR tree-optimization/82434 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target store_merge } */
4 /* { dg-options "-O2 -fdump-tree-store-merging" } */
6 enum E { E0, E1, E2 = __INT_MAX__, E3 = -__INT_MAX__ - 1 };
8 struct bar {
9 enum E a;
10 char b;
11 _Bool c;
12 short d;
15 void
16 foo1 (struct bar *p)
18 p->b = 0;
19 p->a = E0;
20 p->c = (_Bool) 0;
21 p->d = 0;
24 void
25 foo2 (struct bar *p)
27 p->b = 0;
28 p->a = E0;
29 p->c = (_Bool) 1;
30 p->d = 0;
33 /* { dg-final { scan-tree-dump-times "Merging successful" 2 "store-merging" } } */