slist: compile error in debug code
[smatch.git] / validation / sm_buf_size6.c
blobfaf4201e3abd89adb5d9d9a4acb649aadb58c158
1 #include "check_debug.h"
3 void *malloc(int size);
5 int function(void)
7 int *p;
8 int array[1000];
10 p = malloc(4000);
12 __smatch_buf_size(p);
13 __smatch_buf_size(&p[0]);
14 __smatch_buf_size(array);
15 __smatch_buf_size(&array);
16 __smatch_buf_size(&array[0]);
18 return 0;
21 * check-name: smatch buf size #6
22 * check-command: smatch --spammy -I.. sm_buf_size6.c
24 * check-output-start
25 sm_buf_size6.c:12 function() buf size: 'p' 1000 elements, 4000 bytes
26 sm_buf_size6.c:13 function() buf size: '&*p + 0' 1000 elements, 4000 bytes
27 sm_buf_size6.c:14 function() buf size: 'array' 1000 elements, 4000 bytes
28 sm_buf_size6.c:15 function() buf size: '&array' 1 elements, 4000 bytes
29 sm_buf_size6.c:16 function() buf size: '&array[0]' 1000 elements, 4000 bytes
30 * check-output-end