]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/loadpre24.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / loadpre24.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-pre-stats -fno-tree-loop-im" } */
3
4 int a;
5
6 int foo(int argc)
7 {
8 int i;
9 int e;
10
11 for (i = 0; i < argc; i++)
12 {
13 e = a;
14 a = 9;
15 }
16 return e;
17 }
18
19 /* We will move the load of a out of the loop. */
20
21 /* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre" } } */