real_absolute: += and = are not the same
[smatch.git] / validation / sm_buf_size5.c
blob0c138f5050ce709d3a12c42e6998fb648c2d7695
1 #include "check_debug.h"
3 struct foo {
4 char buf[42];
5 int x[4];
6 };
8 int function(void)
10 struct foo foo;
12 __smatch_buf_size(&foo);
13 __smatch_buf_size(&(foo.buf[0]));
14 __smatch_buf_size(&foo.x[0]);
15 __smatch_buf_size(&foo.x[1]);
17 return 0;
20 * check-name: smatch buf size #5
21 * check-command: smatch --spammy -I.. sm_buf_size5.c
23 * check-output-start
24 sm_buf_size5.c:12 function() buf size: '&foo' 1 elements, 60 bytes
25 sm_buf_size5.c:13 function() buf size: '&(foo.buf[0])' 42 elements, 42 bytes
26 sm_buf_size5.c:14 function() buf size: '&foo.x[0]' 4 elements, 16 bytes
27 sm_buf_size5.c:15 function() buf size: '&foo.x[1]' 3 elements, 12 bytes
28 * check-output-end