extra: fix a bug in how pointers are set inside called functions
[smatch.git] / validation / sm_implied11.c
blob1e5a07f68cba85c7c51641aaae8ba9f88fc7e269
1 #include "check_debug.h"
3 struct foo {
4 int x;
5 };
7 void *frob();
9 struct foo *foo;
11 static void ad_agg_selection_logic(void)
13 int a;
16 if (foo && foo->x)
17 a = 1;
18 else
19 a = 0;
21 if (frob())
22 a = frob();
24 if (a)
25 __smatch_implied(foo);
28 * check-name: smatch implied #11
29 * check-command: smatch -I.. -m64 sm_implied11.c
31 * check-output-start
32 sm_implied11.c:25 ad_agg_selection_logic() implied: foo = '0,4096-s64max'
33 * check-output-end