1 #include "check_debug.h"
   2 
   3 struct bar {
   4         int a, b, c;
   5 };
   6 
   7 struct foo {
   8         struct bar bar;
   9         int x, y, z;
  10 };
  11 
  12 int test(int size)
  13 {
  14         struct foo foo = {
  15                 .bar.a = 42,
  16                 .bar.b = 43,
  17                 -1,
  18         };
  19         __smatch_implied(foo.bar.b);
  20         __smatch_implied(foo.bar.c);
  21         __smatch_implied(foo.x);
  22         __smatch_implied(foo.y);
  23 
  24         return 0;
  25 }
  26 
  27 /*
  28  * check-name: smatch: nested initializer
  29  * check-command: smatch -I.. sm_initializer.c
  30  *
  31  * check-output-start
  32 sm_initializer.c:19 test() implied: foo.bar.b = '43'
  33 sm_initializer.c:20 test() implied: foo.bar.c = '0'
  34 sm_initializer.c:21 test() implied: foo.x = '(-1)'
  35 sm_initializer.c:22 test() implied: foo.y = '0'
  36  * check-output-end
  37  */