1 #include "check_debug.h"
   2 
   3 extern int xxx;
   4 
   5 int test(struct bar *bar)
   6 {
   7         int a = 10, b = 10, c = 10, d = 10, e = 10;
   8 
   9         while (a--)
  10                 __smatch_implied(a);
  11         __smatch_implied(a);
  12 
  13         while (--b)
  14                 __smatch_implied(b);
  15         __smatch_implied(b);
  16 
  17         while (--c >= 0)
  18                 __smatch_implied(c);
  19         __smatch_implied(c);
  20 
  21         while (d-- >= 0)
  22                 __smatch_implied(d);
  23         __smatch_implied(d);
  24 
  25         while (e-- >= 0) {
  26                 if (xxx)
  27                         break;
  28                 __smatch_implied(e);
  29         }
  30         __smatch_implied(e);
  31 
  32         return 0;
  33 }
  34 
  35 
  36 /*
  37  * check-name: smatch loops #6
  38  * check-command: smatch -I.. sm_loops6.c
  39  *
  40  * check-output-start
  41 sm_loops6.c:10 test() implied: a = '0-9'
  42 sm_loops6.c:11 test() implied: a = '(-1)'
  43 sm_loops6.c:14 test() implied: b = '1-9'
  44 sm_loops6.c:15 test() implied: b = '0'
  45 sm_loops6.c:18 test() implied: c = '0-9'
  46 sm_loops6.c:19 test() implied: c = '(-1)'
  47 sm_loops6.c:22 test() implied: d = '(-1)-9'
  48 sm_loops6.c:23 test() implied: d = '(-2)'
  49 sm_loops6.c:28 test() implied: e = '(-1)-9'
  50 sm_loops6.c:30 test() implied: e = '(-2)-9'
  51  * check-output-end
  52  */