]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/pr107293.c
Fix profile update in tree_transform_and_unroll_loop
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr107293.c
1 // { dg-do run }
2 // { dg-options "-w -Os" }
3
4 short a;
5 int b[1];
6
7 int c(int p) {
8 return (p < 0) ? 0 : 10 + ((p / 100 - 16) / 4);
9 }
10
11 void f(int n) {
12 while (1) {
13 int m = n;
14 while ((m ) )
15 m /= 2;
16 break;
17 }
18 }
19
20 void g() {
21 int h = a = 0;
22 for (; h + a <= 0; a++) {
23 if (b[c(a - 6)])
24 break;
25 f(a);
26 }
27 }
28 int main() {
29 g();
30 if (a != 1)
31 __builtin_abort ();
32 }