Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-10.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-O2 -fdump-tree-lim2-details" } */ | |
3 | |
4 int *l, *r; | |
5 int test_func(void) | |
6 { | |
7 int i; | |
8 int direction; | |
9 static int pos; | |
10 | |
11 pos = 0; | |
12 direction = 1; | |
13 | |
14 for ( i = 0; i <= 400; i++ ) | |
15 { | |
16 if ( direction == 0 ) | |
17 pos = l[pos]; | |
18 else | |
19 pos = r[pos]; | |
20 | |
21 if ( pos == -1 ) | |
22 { | |
23 pos = 0; | |
24 direction = !direction; | |
25 } | |
26 } | |
27 return i; | |
28 } | |
29 | |
30 /* { dg-final { scan-tree-dump "Executing store motion of pos" "lim2" } } */ |