22 lines · c
1// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s2// PR69133 4int main(void)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 17void foo(int a[*][2]) {(void)a[0][1]; } // expected-error {{variable length array must be bound in function definition}}18void foo1(int a[2][*]) {(void)a[0][1]; } // expected-error {{variable length array must be bound in function definition}}19void foo2(int a[*][*]) {(void)a[0][1]; } // expected-error {{variable length array must be bound in function definition}}20void foo3(int a[2][*][2]) {(void)a[0][1][1]; } // expected-error {{variable length array must be bound in function definition}}21void foo4(int a[2][*][*]) {(void)a[0][1][1]; } // expected-error {{variable length array must be bound in function definition}}22