vla-sizeof0.c 311 B

123456789101112131415161718192021
  1. #define N 2
  2. #define T int
  3. static unsigned int foo(int x)
  4. {
  5. T a[(1,N)];
  6. return sizeof(a) == (N * sizeof(T));
  7. }
  8. /*
  9. * check-name: vla-sizeof cte,cte
  10. * check-command: test-linearize -Wvla $file
  11. *
  12. * check-output-ignore
  13. * check-output-contains: ret\\.32 *\\$1
  14. *
  15. * check-error-start
  16. * check-error-end
  17. */