xref: /illumos-gate/usr/src/tools/smatch/src/validation/sm_compare16.c (revision 1f5207b7604fb44407eb4342aff613f7c4508508)
1*1f5207b7SJohn Levon #include <stdio.h>
2*1f5207b7SJohn Levon #include <string.h>
3*1f5207b7SJohn Levon #include "check_debug.h"
4*1f5207b7SJohn Levon 
return_x(int x)5*1f5207b7SJohn Levon int return_x(int x)
6*1f5207b7SJohn Levon {
7*1f5207b7SJohn Levon 	return x;
8*1f5207b7SJohn Levon }
9*1f5207b7SJohn Levon 
10*1f5207b7SJohn Levon int a;
cmp_x(int x,int y)11*1f5207b7SJohn Levon int cmp_x(int x, int y)
12*1f5207b7SJohn Levon {
13*1f5207b7SJohn Levon 	if (a > return_x(5))
14*1f5207b7SJohn Levon 		return;
15*1f5207b7SJohn Levon 	__smatch_implied(a);
16*1f5207b7SJohn Levon }
17*1f5207b7SJohn Levon 
18*1f5207b7SJohn Levon 
19*1f5207b7SJohn Levon /*
20*1f5207b7SJohn Levon  * check-name: smatch compare #16
21*1f5207b7SJohn Levon  * check-command: smatch -I.. sm_compare16.c
22*1f5207b7SJohn Levon  *
23*1f5207b7SJohn Levon  * check-output-start
24*1f5207b7SJohn Levon sm_compare16.c:15 cmp_x() implied: a = 's32min-5'
25*1f5207b7SJohn Levon  * check-output-end
26*1f5207b7SJohn Levon  */
27