vla.c revision 67027a7bc35671bc3f6d5c109720060f06303391
1// RUN: clang %s -verify -fsyntax-only
2
3int test1() {
4  typedef int x[test1()];  // vla
5  static int y = sizeof(x);  // expected-error {{not a compile-time constant}}
6}
7
8// PR2347
9void f (unsigned int m)
10{
11  int e[2][m];
12
13  e[0][0] = 0;
14}
15
16// PR3048
17int x = sizeof(struct{char qq[x];}); // expected-error {{fields must have a constant size}}
18
19