summaryrefslogtreecommitdiffstats
path: root/test/Sema/crash-invalid-array.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/crash-invalid-array.c')
-rw-r--r--test/Sema/crash-invalid-array.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/Sema/crash-invalid-array.c b/test/Sema/crash-invalid-array.c
index eeac391..029413b 100644
--- a/test/Sema/crash-invalid-array.c
+++ b/test/Sema/crash-invalid-array.c
@@ -1,18 +1,16 @@
-// RUN: not %clang_cc1 -O1 %s -emit-llvm
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s
// PR6913
-#include <stdio.h>
-
int main()
{
int x[10][10];
- int (*p)[] = x; // expected-error {{invalid use of array with unspecified bounds}
+ int (*p)[] = x;
int i;
for(i = 0; i < 10; ++i)
{
- p[i][i] = i;
+ p[i][i] = i; // expected-error {{subscript of pointer to incomplete type 'int []'}}
}
}
OpenPOWER on IntegriCloud