Print this page
new smatch
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/smatch/src/validation/backend/sum.c
+++ new/usr/src/tools/smatch/src/validation/backend/sum.c
1 1 #include <stdio.h>
2 2 #include <stdlib.h>
3 3
4 4 static int sum(int n)
5 5 {
6 6 int i, result = 0;
7 7
8 8 for (i = 1; i <= n; ++i)
9 9 result += i;
10 10 return result;
11 11 }
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12
13 13 int main(int argc, char **argv)
14 14 {
15 15 printf("%d\n", sum(5));
16 16 printf("%d\n", sum(100));
17 17 return 0;
18 18 }
19 19
20 20 /*
21 21 * check-name: sum from 1 to n
22 - * check-command: sparsei $file
22 + * check-command: sparsei --no-jit $file
23 23 *
24 24 * check-output-start
25 25 15
26 26 5050
27 27 * check-output-end
28 28 */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX