diff options
Diffstat (limited to 'test/Sema/crash-invalid-array.c')
-rw-r--r-- | test/Sema/crash-invalid-array.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/crash-invalid-array.c b/test/Sema/crash-invalid-array.c index a3bc03b70b..eeac39148c 100644 --- a/test/Sema/crash-invalid-array.c +++ b/test/Sema/crash-invalid-array.c @@ -15,3 +15,10 @@ int main() p[i][i] = i; } } + +// rdar://13705391 +void foo(int a[*][2]) {(void)a[0][1]; } // expected-error {{variable length array must be bound in function definition}} +void foo1(int a[2][*]) {(void)a[0][1]; } // expected-error {{variable length array must be bound in function definition}} +void foo2(int a[*][*]) {(void)a[0][1]; } // expected-error {{variable length array must be bound in function definition}} +void foo3(int a[2][*][2]) {(void)a[0][1][1]; } // expected-error {{variable length array must be bound in function definition}} +void foo4(int a[2][*][*]) {(void)a[0][1][1]; } // expected-error {{variable length array must be bound in function definition}} |