extra: add more parameter dereferences
[smatch.git] / validation / sm_buf_size7.c
blobe65aed28c888f4b832718c35871a85803290d7e7
1 #include "check_debug.h"
3 int test(void)
5 int a[] = { [1] = 2 };
6 int b[] = { 1, 2, 3 };
7 int c[] = { 0, [0] = 1, 2, 3};
8 int d[] = { 0, [3] = 4, 5};
10 __smatch_buf_size(a);
11 __smatch_buf_size(b);
12 __smatch_buf_size(c);
13 __smatch_buf_size(d);
17 * check-name: smatch buf size #7
18 * check-command: smatch -I.. sm_buf_size7.c
20 * check-output-start
21 sm_buf_size7.c:10 test() buf size: 'a' 2 elements, 8 bytes
22 sm_buf_size7.c:11 test() buf size: 'b' 3 elements, 12 bytes
23 sm_buf_size7.c:12 test() buf size: 'c' 3 elements, 12 bytes
24 sm_buf_size7.c:13 test() buf size: 'd' 5 elements, 20 bytes
25 * check-output-end