1 #include "check_debug.h"
   2 
   3 int *something();
   4 
   5 int *one;
   6 int *two;
   7 int func(void)
   8 {
   9         one = something();
  10         two = one;
  11 
  12         if (two == 1) {
  13                 __smatch_value("one");
  14                 __smatch_value("two");
  15         }
  16         __smatch_value("one");
  17         __smatch_value("two");
  18         if (one == 2) {
  19                 __smatch_value("one");
  20                 __smatch_value("two");
  21         }
  22         __smatch_value("one");
  23         __smatch_value("two");
  24         return 0;
  25 }
  26 /*
  27  * check-name: smatch equivalent variables #1
  28  * check-command: smatch -I.. -m64 sm_equiv1.c
  29  *
  30  * check-output-start
  31 sm_equiv1.c:13 func() one = 1
  32 sm_equiv1.c:14 func() two = 1
  33 sm_equiv1.c:16 func() one = 0-u64max
  34 sm_equiv1.c:17 func() two = 0-u64max
  35 sm_equiv1.c:19 func() one = 2
  36 sm_equiv1.c:20 func() two = 2
  37 sm_equiv1.c:22 func() one = 0-u64max
  38 sm_equiv1.c:23 func() two = 0-u64max
  39  * check-output-end
  40  */