xref: /illumos-gate/usr/src/tools/smatch/src/validation/backend/store-x2.c (revision 66582b606a8194f7f3ba5b3a3a6dca5b0d346361)
1 void foo(int *p, int a, int b);
2 void foo(int *p, int a, int b)
3 {
4 	int c = a + b;
5 
6 	p[0] = c;
7 	p[1] = c;
8 }
9 
10 /*
11  * check-name: store-x2
12  * check-command: sparsec -c $file -o tmp.o
13  * check-description: Verify in output_op_store() that
14  *	the first store doesn't mess anymore with the
15  *	'target' and thus making the second store unusable.
16  */
17