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