1 #include <stdio.h>
   2 #include "check_debug.h"
   3 
   4 int frob1(int *p)
   5 {
   6         __smatch_implied(*p);
   7 }
   8 
   9 int frob2(int *p)
  10 {
  11         __smatch_implied(*p);
  12 }
  13 
  14 int x = 42;
  15 
  16 struct foo {
  17         int a, b, c;
  18 };
  19 struct foo aaa = {
  20         .a = 1, .b = 2, .c = 3,
  21 };
  22 
  23 int array[10];
  24 
  25 int main(void)
  26 {
  27         frob1(&x);
  28         frob2(&aaa.b);
  29 
  30         return 0;
  31 }
  32 
  33 /*
  34  * check-name: smatch mtag #6
  35  * check-command: validation/smatch_db_test.sh -I.. sm_mtag6.c
  36  *
  37  * check-output-start
  38 sm_mtag6.c:6 frob1() implied: *p = '42'
  39 sm_mtag6.c:11 frob2() implied: *p = '2'
  40  * check-output-end
  41  */