param_key: fix container of when no struct member is referenced
[smatch.git] / validation / builtin-objsize1.c
blob1f285fc5f6acabba567a1572f62ef617c2d0da2c
1 #define bos(O, T) __builtin_object_size(O, T)
3 struct s {
4 char arr[8];
5 __INT32_TYPE__ i;
6 __INT32_TYPE__ padding;
7 };
9 static struct s s;
11 int obj_int1(void) { return bos(&s.i, 1) == 4; }
12 int obj_arr1(void) { return bos(&s.arr[1], 1) == 7; }
15 * check-name: builtin-objsize1
16 * check-command: test-linearize -Wno-decl $file
17 * check-known-to-fail
19 * check-output-ignore
20 * check-output-returns: 1