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