1 #include "check_debug.h"
   2 
   3 int some_func(void);
   4 
   5 int a;
   6 int frob(int *p)
   7 {
   8         int ret = 0;
   9 
  10         *p = 4;
  11         if (a)
  12                 goto out;
  13 
  14         *p = some_func();
  15         if (*p < 10 || *p > 100) {
  16                 ret = -12;
  17                 goto out;
  18         }
  19 
  20 out:
  21         return ret;
  22 }
  23 
  24 void test(void)
  25 {
  26         int var = 0;
  27         int ret;
  28 
  29         ret = frob(&var);
  30         __smatch_implied(var);
  31         if (ret)
  32                 return;
  33         __smatch_implied(var);
  34 }
  35 /*
  36  * check-name: smatch implied #15
  37  * check-command: smatch -I.. sm_implied15.c
  38  *
  39  * check-output-start
  40 sm_implied15.c:30 test() implied: var = 's32min-s32max'
  41 sm_implied15.c:33 test() implied: var = '4,10-100'
  42  * check-output-end
  43  */