1 #include "check_debug.h" 2 3 int a, b, c; 4 frob(void)5static int frob(void) 6 { 7 if (a > 5) 8 return; 9 if (b > 5) 10 return; 11 if (c != 5) 12 return; 13 14 if (a == 10) 15 __smatch_value("a"); 16 if (b != 10) 17 __smatch_value("b"); 18 if (c != 5) 19 __smatch_value("c"); 20 if (5 != c) 21 __smatch_value("c"); 22 23 __smatch_value("a"); 24 __smatch_value("b"); 25 __smatch_value("c"); 26 } 27 28 /* 29 * check-name: Smatch Comparison 30 * check-command: smatch -I.. sm_compare.c 31 * 32 * check-output-start 33 sm_compare.c:15 frob() a = empty 34 sm_compare.c:17 frob() b = s32min-5 35 sm_compare.c:19 frob() c = empty 36 sm_compare.c:21 frob() c = empty 37 sm_compare.c:23 frob() a = s32min-5 38 sm_compare.c:24 frob() b = s32min-5 39 sm_compare.c:25 frob() c = 5 40 * check-output-end 41 */ 42