1*1f5207b7SJohn Levon #include "check_debug.h"
2*1f5207b7SJohn Levon 
test(void)3*1f5207b7SJohn Levon int test(void)
4*1f5207b7SJohn Levon {
5*1f5207b7SJohn Levon 	int a[] = { [1] = 2 };
6*1f5207b7SJohn Levon 	int b[] = { 1, 2, 3 };
7*1f5207b7SJohn Levon 	int c[] = { 0, [0] = 1, 2, 3};
8*1f5207b7SJohn Levon 	int d[] = { 0, [3] = 4, 5};
9*1f5207b7SJohn Levon 
10*1f5207b7SJohn Levon 	__smatch_buf_size(a);
11*1f5207b7SJohn Levon 	__smatch_buf_size(b);
12*1f5207b7SJohn Levon 	__smatch_buf_size(c);
13*1f5207b7SJohn Levon 	__smatch_buf_size(d);
14*1f5207b7SJohn Levon }
15*1f5207b7SJohn Levon 
16*1f5207b7SJohn Levon /*
17*1f5207b7SJohn Levon  * check-name: smatch buf size #7
18*1f5207b7SJohn Levon  * check-command: smatch -I.. sm_buf_size7.c
19*1f5207b7SJohn Levon  *
20*1f5207b7SJohn Levon  * check-output-start
21*1f5207b7SJohn Levon sm_buf_size7.c:10 test() buf size: 'a' 2 elements, 8 bytes
22*1f5207b7SJohn Levon sm_buf_size7.c:11 test() buf size: 'b' 3 elements, 12 bytes
23*1f5207b7SJohn Levon sm_buf_size7.c:12 test() buf size: 'c' 3 elements, 12 bytes
24*1f5207b7SJohn Levon sm_buf_size7.c:13 test() buf size: 'd' 5 elements, 20 bytes
25*1f5207b7SJohn Levon  * check-output-end
26*1f5207b7SJohn Levon  */
27