fixed lots of warnings in testprograms
[libfirm] / ir / be / test / ForTest.c
1 //
2 // GCC-firm Project
3 //
4 // $Id$
5 //
6 // Testprogram to test GCC-firm : For loop
7
8 #include <stdio.h>
9
10 typedef int boolean;
11
12 #define true    1
13 #define false   0
14
15 static int simpleloop (int a, int b) {
16         int i, j;
17         boolean loopfinal = true;
18
19         for(i = 0; (i < 10) && loopfinal; i++) {
20                 if(5 == i)
21                         loopfinal = false;
22                 printf("%d ", i);
23         }
24         printf("\n");
25
26         for(i = 0; i < a; ++i) {
27                 for(j = 0; j < b; ++j) {
28                         printf("%d,%d\n", i, j);
29                 }
30         }
31         return(i);
32 }
33
34 int main (int argc, char *argv[]) {
35         printf("ForTest.c\n");
36
37         simpleloop(3, 10);
38         return 0;
39 }