OSDN Git Service

2008-07-28 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-14.c
1 /* A test for final value replacement.  */
2
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4
5 int foo(void);
6
7 int bla(void)
8 {
9   int i, j = foo ();
10
11   for (i = 0; i < 100; i++, j++)
12     foo ();
13
14   /* Should be replaced with return j0 + 100;  */
15   return j;
16 }
17
18 /* { dg-final { scan-tree-dump-times "\\+ 100" 1 "optimized" } } */
19 /* { dg-final { cleanup-tree-dump "optimized" } } */