projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
indentation fixed
[libfirm]
/
ir
/
be
/
test
/
trivial_sum_upto.c
1
#include <stdio.h>
2
3
/*
4
* A simple loop
5
* Shows backendges.
6
*/
7
int sum_upto(int n)
8
{
9
int i, res = 0;
10
11
for(i = 0; i < n; ++i)
12
res += i;
13
14
return res;
15
}
16
17
int main(int argc, char *argv[])
18
{
19
printf("%d\n", sum_upto(42));
20
return 0;
21
}