1 #include "check_debug.h"
   2 
   3 struct ture {
   4         int x, y;
   5 };
   6 
   7 struct ture outside = {
   8         .x = 1,
   9         .y = 2,
  10 };
  11 
  12 struct ture buf[10];
  13 void test(void)
  14 {
  15         int a, b;
  16 
  17         a = 0;
  18         b = 0;
  19         buf[a++] = outside;
  20         buf[++b] = outside;
  21         __smatch_implied(a);
  22         __smatch_implied(b);
  23 }
  24 
  25 /*
  26  * check-name: smatch fake assignment
  27  * check-command: smatch -I.. sm_fake_assignment.c
  28  *
  29  * check-output-start
  30 sm_fake_assignment.c:21 test() implied: a = '1'
  31 sm_fake_assignment.c:22 test() implied: b = '1'
  32  * check-output-end
  33  */