param_key: fix container of when no struct member is referenced
[smatch.git] / validation / vla-sizeof2.c
blob57927d1693afa03cef868c6efe2753646815c063
1 #define N 2
2 #define T int
4 static unsigned long foo(int x)
6 T a[x];
8 return sizeof(a) == (x * sizeof(T));
12 * check-name: vla-sizeof var
13 * check-command: test-linearize -Wvla $file
15 * check-output-ignore
16 * check-output-contains: ret\\..*\\$1
18 * check-error-start
19 vla-sizeof2.c:6:13: warning: Variable length array is used.
20 * check-error-end