more warning fixes
[libfirm] / ir / be / test / ll_call.c
1 #include <stdio.h>
2
3 #if 1
4 //#ifdef __GNUC__
5 long long fac(long long n)
6 {
7     if(n < 1)
8         return 1;
9
10     return (n*fac(n-1));
11 }
12
13 int main(void) {
14     printf("Result:%lld (should be 3628800)\n",fac(10));
15         printf("Result:%lld (should be 39916800)\n",fac(11));
16     printf("Result:%lld (should be 479001600)\n",fac(12));
17     printf("Result:%lld (should be 6227020800)\n",fac(13));
18     printf("Result:%lld (should be 87178291200)\n",fac(14));
19     printf("Result:%lld (should be 1307674368000)\n",fac(15));
20     printf("Result:%lld (should be 20922789888000)\n",fac(16));
21     printf("Result:%lld (should be 355687428096000)\n",fac(17));
22     printf("Result:%lld (should be 6402373705728000)\n",fac(18));
23     printf("Result:%lld (should be 121645100408832000)\n",fac(19));
24     printf("Result:%lld (should be 2432902008176640000)\n",fac(20));
25
26         return fac(20) != 2432902008176640000ULL;
27 }
28
29 #else
30 int main()
31 {
32     return 0;
33 }
34 #endif