aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-25 05:51:14 +0000
committerChris Lattner <sabre@nondot.org>2010-04-25 05:51:14 +0000
commit84c6e60c02645524a1f3b4c2351d6c12c21cac51 (patch)
treed415b8f9b837b2ed28391c8c95dfb07d82105f98 /test/FrontendC
parentff1c0444eaeb3474e7b86eb7dcc79a554768aae3 (diff)
downloadexternal_llvm-84c6e60c02645524a1f3b4c2351d6c12c21cac51.zip
external_llvm-84c6e60c02645524a1f3b4c2351d6c12c21cac51.tar.gz
external_llvm-84c6e60c02645524a1f3b4c2351d6c12c21cac51.tar.bz2
testcase for PR6913
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102303 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FrontendC')
-rw-r--r--test/FrontendC/crash-invalid-array.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/FrontendC/crash-invalid-array.c b/test/FrontendC/crash-invalid-array.c
new file mode 100644
index 0000000..d602f785
--- /dev/null
+++ b/test/FrontendC/crash-invalid-array.c
@@ -0,0 +1,17 @@
+// RUN: not %llvmgcc -O1 %s -S |& grep {error: invalid use of array with unspecified bounds}
+// PR6913
+
+#include <stdio.h>
+
+int main()
+{
+ int x[10][10];
+ int (*p)[] = x; // <-- this line is what triggered it
+
+ int i;
+
+ for(i = 0; i < 10; ++i)
+ {
+ p[i][i] = i;
+ }
+}