OSDN Git Service

* tree-loop-linear.c (try_interchange_loops): Compare memory access
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / reassoc-1.c
1 /* { dg-do compile } */ 
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 int a, b, c, d;
4 extern int printf (const char *, ...);
5 int main(void)
6 {
7   int e;
8   int f;
9   /* We should be able to transform these into the same expression, and only have two additions.  */
10   e = a + b;
11   e = e + c;
12   f = c + a;
13   f = f + b;
14   printf ("%d %d\n", e, f);
15 }
16
17 /* { dg-final { scan-tree-dump-times "b \\\+ a" 1 "optimized"} } */
18 /* { dg-final { cleanup-tree-dump "optimized" } } */