aboutsummaryrefslogtreecommitdiff
path: root/rcc-legacy/tests/functional/loop_unroll4.sy
blob: 4eb1f27716d362f1f71b5bae6f448ab0f1290c83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
void test4(int n) {
    int i = 0, j = 0;
    
    i = 0;
    while (i < n) {
        j = n;
        while (i < j) {
            j = j - 1;
            i = i + 1;
        }
    }
    putint(j);
    putch(10);
    putint(i);
    putch(10);
}

int main() {
    int i;
    i = -1;
    while (i < 10) {
        i = i + 1;
        test4(i);
    }
    return 0;
}