comparison: select the caller_info
[smatch.git] / validation / vla-sizeof.c
blob43079992c07ed26c54eadf81e1944b060bf2dbc2
1 unsigned long vla_sizeof0(int size)
3 int a[size];
4 return sizeof(a);
7 unsigned long vla_sizeof1(int size)
9 struct s {
10 int a[size];
12 return sizeof(struct s);
15 unsigned long vla_sizeof2(int size)
17 struct s {
18 int a[size];
19 } *p;
20 return sizeof(*p);
23 void* vla_inc(int size, void *base)
25 struct s {
26 int a[size];
27 } *p = base;
29 ++p;
30 return p;
34 * check-name: vla-sizeof.c
36 * check-known-to-fail