1 #include "check_debug.h"
   2 
   3 struct foo {
   4         int x;
   5 };
   6 
   7 void *frob();
   8 
   9 struct foo *foo;
  10 
  11 int x;
  12 
  13 static void ad_agg_selection_logic(void)
  14 {
  15         int a;
  16 
  17 
  18         if (x) {
  19                 if (foo && foo->x)
  20                         a = 1;
  21                 else
  22                         a = 0;
  23 
  24                 if (frob())
  25                         a = frob();
  26 
  27                 if (a)
  28                         __smatch_implied(foo);
  29         }
  30 }
  31 /*
  32  * check-name: smatch implied #12
  33  * check-command: smatch -I.. -m64 sm_implied12.c
  34  *
  35  * check-output-start
  36 sm_implied12.c:28 ad_agg_selection_logic() implied: foo = '0,4096-ptr_max'
  37  * check-output-end
  38  */