xref: /illumos-gate/usr/src/tools/smatch/src/validation/sm_implied13.c (revision cd61ae21816e53b94bc1673f3f1aa651fc3115e8)
1 #include "check_debug.h"
2 
3 int main(int x)
4 {
5 	int a = 1;
6 
7 	if (x & 12)
8 		a = 2;
9 	__smatch_implied(a);
10 	if (!(x & 12))
11 		return 0;
12 	__smatch_implied(a);
13 	return 0;
14 }
15 
16 /*
17  * check-name: smatch implied #13
18  * check-command: smatch -I.. sm_implied13.c
19  *
20  * check-output-start
21 sm_implied13.c:9 main() implied: a = '1-2'
22 sm_implied13.c:12 main() implied: a = '2'
23  * check-output-end
24  */
25