xref: /illumos-gate/usr/src/tools/smatch/src/validation/sm_mtag5.c (revision c65ebfc7045424bd04a6c7719a27b0ad3399ad54)
1 #include <stdio.h>
2 #include "check_debug.h"
3 
4 int x = 42;
5 
6 struct foo {
7 	int a, b, c;
8 };
9 struct foo aaa = {
10 	.a = 1, .b = 2, .c = 3,
11 };
12 
13 int array[10];
14 
15 int main(void)
16 {
17 	__smatch_implied(&x);
18 	__smatch_implied(&aaa);
19 	__smatch_implied(&aaa.b);
20 	__smatch_implied(array);
21 	__smatch_implied(&array[1]);
22 
23 	return 0;
24 }
25 
26 /*
27  * check-name: smatch mtag #5
28  * check-command: smatch -I.. sm_mtag5.c
29  *
30  * check-output-start
31 sm_mtag5.c:17 main() implied: &x = '799717014380380160'
32 sm_mtag5.c:18 main() implied: &aaa = '126458562737565696'
33 sm_mtag5.c:19 main() implied: &aaa.b = '126458562737565700'
34 sm_mtag5.c:20 main() implied: array = '7934625272050024448'
35 sm_mtag5.c:21 main() implied: &array[1] = '7934625272050024452'
36  * check-output-end
37  */
38