Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/store_merging_9.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* PR tree-optimization/82434 */ | |
2 /* { dg-do compile } */ | |
3 /* { dg-require-effective-target store_merge } */ | |
4 /* { dg-options "-O2 -fdump-tree-store-merging" } */ | |
5 | |
6 enum E { E0, E1, E2 = __INT_MAX__, E3 = -__INT_MAX__ - 1 }; | |
7 | |
8 struct bar { | |
9 enum E a; | |
10 char b; | |
11 _Bool c; | |
12 short d; | |
13 }; | |
14 | |
15 void | |
16 foo1 (struct bar *p) | |
17 { | |
18 p->b = 0; | |
19 p->a = E0; | |
20 p->c = (_Bool) 0; | |
21 p->d = 0; | |
22 } | |
23 | |
24 void | |
25 foo2 (struct bar *p) | |
26 { | |
27 p->b = 0; | |
28 p->a = E0; | |
29 p->c = (_Bool) 1; | |
30 p->d = 0; | |
31 } | |
32 | |
33 /* { dg-final { scan-tree-dump-times "Merging successful" 2 "store-merging" } } */ |