fix belistsched for new scheduling API
[libfirm] / ir / be / test / IfExpr.c
1 //
2 // GCC-firm Project
3 //
4 // $Id$
5 //
6 // Testprogram to test GCC-firm : Declatations - part ][
7
8 #include <stdio.h>
9
10 static int test (int arg0) {
11     int a, b, c;
12     a = arg0;
13     c = 2;
14     b = 69;
15     if((a) == c) {
16         c = b - 1;
17     }
18     else {
19         c = a + 77;
20     }
21     return(c);
22 }
23
24 static int const_if(int arg0) {
25     int a;
26     if(2 < 3) {
27         a = 5;
28     }
29     else {
30         a = 7;
31     }
32     return(a);
33 }
34
35 int main(int argc, char *argv[]) {
36     printf("IfExpr.c\n");
37
38     printf(" test(2) = %d (should be 68)\n", test(2));
39     printf(" test(3) = %d (should be 80)\n", test(3));
40     printf(" const_if(0) = %d (should be 5)\n", const_if(0));
41
42     return 0;
43 }