db/fixup_kernel.sh: update vfs_write() code
[smatch.git] / validation / backend / sum.c
blob38ebf41ed16c731c7e0643d7a9d18cec856cfe6d
1 int printf(const char * fmt, ...);
3 static int sum(int n)
5 int i, result = 0;
7 for (i = 1; i <= n; ++i)
8 result += i;
9 return result;
12 int main(int argc, char **argv)
14 printf("%d\n", sum(5));
15 printf("%d\n", sum(100));
16 return 0;
20 * check-name: sum from 1 to n
21 * check-command: sparsei --no-jit $file
23 * check-output-start
25 5050
26 * check-output-end