From: Eric Christopher Date: Fri, 22 Jul 2011 07:26:22 +0000 (+0000) Subject: Bring over a test from llvm/test/FrontendC that is for Sema and not CodeGen. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c634a04a23171cc2356e3129fb16b8e9da3bf00;p=clang Bring over a test from llvm/test/FrontendC that is for Sema and not CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135753 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/crash-invalid-array.c b/test/Sema/crash-invalid-array.c new file mode 100644 index 0000000000..a3bc03b70b --- /dev/null +++ b/test/Sema/crash-invalid-array.c @@ -0,0 +1,17 @@ +// RUN: not %clang_cc1 -O1 %s -emit-llvm +// PR6913 + +#include + +int main() +{ + int x[10][10]; + int (*p)[] = x; // expected-error {{invalid use of array with unspecified bounds} + + int i; + + for(i = 0; i < 10; ++i) + { + p[i][i] = i; + } +}