projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
call optimize_cf() to delete dead-code that might arise after cond_eval
[libfirm]
/
ir
/
be
/
test
/
tailrec2.c
1
#include <stdio.h>
2
#include <stdlib.h>
3
4
unsigned fak(unsigned n) {
5
if (n == 0)
6
return 1;
7
return fak(n-1) * n;
8
}
9
10
int main(int argc, char *argv[]) {
11
unsigned v = 7;
12
13
if (argc > 1)
14
v = atoi(argv[1]);
15
printf("%u! = %u\n", v, fak(v));
16
}