1 #include "check_debug.h" 2 3 int frob(void); 4 5 int a; 6 int func (char *input) 7 { 8 int x = frob(); 9 10 if (a == 1) { 11 if (x != -5) 12 return; 13 } else if (a == 2) { 14 if (x != 0) 15 return; 16 } else if (a == 3) { 17 if (x != 42) 18 return; 19 } else { 20 return; 21 } 22 23 if (x) { 24 __smatch_implied(x); 25 __smatch_implied(a); 26 } 27 28 if (x == -5) 29 __smatch_implied(a); 30 31 return 0; 32 } 33 34 /* 35 * check-name: smatch implied #16 36 * check-command: smatch -I.. sm_implied16.c 37 * 38 * check-output-start 39 sm_implied16.c:24 func() implied: x = '(-5),42' 40 sm_implied16.c:25 func() implied: a = '1,3' 41 sm_implied16.c:29 func() implied: a = '1' 42 * check-output-end 43 */ 44