don't compare EmptyFor
[libfirm] / ir / be / test / XXEndless.c
1 #include <stdio.h>
2 #include <stdlib.h>
3
4
5 #define true    1
6
7 static int loop = 2;
8
9 static void nop(void) {}
10
11 static int me1(int num) {
12     int i = 0;
13
14     if (num == 1) {
15         printf("Going into endless loop 1 \n .... \n ");
16         while(7 > 2) {
17             printf("%d\n", i++);
18         }
19     } else {
20         num ++;
21     }
22     return num;
23 }
24
25 static void me2(int num) {
26     int i = 0;
27
28     if (num != 2) {
29         nop();
30     } else {
31         printf("Going into endless loop 2 \n .... \n ");
32         while(true) {
33             printf("%d\n", i++);
34         }
35     }
36 }
37
38 static void me3(int num) {
39     int i = 0;
40
41     printf("Going into endless loop 3 \n .... \n ");
42     while(true) {
43         printf("%d\n", i++);
44     }
45 }
46
47 int main(int argc, char *argv[]) {
48     int i = 0;
49
50     printf("XXEndless.c\n");
51     if (argc != 2) {
52         printf("\nUsage: Endless n, where n determines the loop.\n");
53         printf("Continuing with default input.\n");
54     } else {
55         loop = atoi(argv[1]);
56     }
57     me1(loop);
58     me2(loop);
59     me3(loop);
60 }