No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / testsuite / gcc.dg / tree-ssa / reassoc-2.c
blob6171fb903e571264833a9bcaf27725bbcf9d5ee3
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized -fdump-tree-reassoc-details" } */
3 extern int a0, a1, a2, a3, a4;
4 int f ()
5 {
6 int b0, b1, b2, b3, b4;
7 /* this can be optimized to four additions... */
8 b4 = a4 + a3 + a2 + a1 + a0;
9 b3 = a3 + a2 + a1 + a0;
10 b2 = a2 + a1 + a0;
11 b1 = a1 + a0;
12 /* This is actually 0 */
13 return b4 - b3 + b2 - b1 - a4 - a2;
15 /* { dg-final { scan-tree-dump-times "Reassociating by rank" 3 "reassoc" } } */
16 /* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" { xfail *-*-* } } } */
17 /* { dg-final { cleanup-tree-dump "optimized" } } */
18 /* { dg-final { cleanup-tree-dump "reassoc" } } */