1f08c3bdfSopenharmony_ci#define N 2 2f08c3bdfSopenharmony_ci#define T int 3f08c3bdfSopenharmony_ci 4f08c3bdfSopenharmony_cistatic unsigned long foo(int x) 5f08c3bdfSopenharmony_ci{ 6f08c3bdfSopenharmony_ci T a[x]; 7f08c3bdfSopenharmony_ci 8f08c3bdfSopenharmony_ci return sizeof(a) == (x * sizeof(T)); 9f08c3bdfSopenharmony_ci} 10f08c3bdfSopenharmony_ci 11f08c3bdfSopenharmony_ci/* 12f08c3bdfSopenharmony_ci * check-name: vla-sizeof var 13f08c3bdfSopenharmony_ci * check-command: test-linearize -Wvla $file 14f08c3bdfSopenharmony_ci * 15f08c3bdfSopenharmony_ci * check-output-ignore 16f08c3bdfSopenharmony_ci * check-output-contains: ret\\..*\\$1 17f08c3bdfSopenharmony_ci * 18f08c3bdfSopenharmony_ci * check-error-start 19f08c3bdfSopenharmony_civla-sizeof2.c:6:13: warning: Variable length array is used. 20f08c3bdfSopenharmony_ci * check-error-end 21f08c3bdfSopenharmony_ci */ 22