xref: /illumos-gate/usr/src/tools/smatch/src/validation/sm_absolute2.c (revision 689b9301078f0c35c7f198fcee8032a0d30eff3a)
1 #include "check_debug.h"
2 
3 static int my_var;
4 
5 int x;
6 int func(int *p)
7 {
8 	unsigned int a = -1;
9 
10 	x = a;
11 	__smatch_absolute_min(a);
12 	__smatch_absolute_max(a);
13 	__smatch_absolute_min(x);
14 	__smatch_absolute_max(x);
15 	__smatch_implied(a);
16 	__smatch_implied(x);
17 	__smatch_sval_info(a);
18 	__smatch_sval_info(x);
19 }
20 /*
21  * check-name: smatch: absolute #2
22  * check-command: smatch -I.. sm_absolute2.c
23  *
24  * check-output-start
25 sm_absolute2.c:11 func() absolute min: a = u32max
26 sm_absolute2.c:12 func() absolute max: a = u32max
27 sm_absolute2.c:13 func() absolute min: x = (-1)
28 sm_absolute2.c:14 func() absolute max: x = (-1)
29 sm_absolute2.c:15 func() implied: a = 'u32max'
30 sm_absolute2.c:16 func() implied: x = '(-1)'
31 sm_absolute2.c:17 func() implied: a u32 ->value = ffffffff
32 sm_absolute2.c:18 func() implied: x s32 ->value = ffffffffffffffff
33  * check-output-end
34  */
35