1// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s
2// PR6913
3
4int main()
5{
6   int x[10][10];
7   int (*p)[] = x;
8
9   int i;
10
11   for(i = 0; i < 10; ++i)
12   {
13       p[i][i] = i; // expected-error {{subscript of pointer to incomplete type 'int []'}}
14   }
15}
16
17// rdar://13705391
18void foo(int a[*][2]) {(void)a[0][1]; } // expected-error {{variable length array must be bound in function definition}}
19void foo1(int a[2][*]) {(void)a[0][1]; } // expected-error {{variable length array must be bound in function definition}}
20void foo2(int a[*][*]) {(void)a[0][1]; } // expected-error {{variable length array must be bound in function definition}}
21void foo3(int a[2][*][2]) {(void)a[0][1][1]; } // expected-error {{variable length array must be bound in function definition}}
22void foo4(int a[2][*][*]) {(void)a[0][1][1]; } // expected-error {{variable length array must be bound in function definition}}
23