mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 14:06:07 +00:00
Bring over a test from llvm/test/FrontendC that is for Sema and not CodeGen.
llvm-svn: 135753
This commit is contained in:
parent
e135b089d8
commit
516a79e32c
17
clang/test/Sema/crash-invalid-array.c
Normal file
17
clang/test/Sema/crash-invalid-array.c
Normal file
@ -0,0 +1,17 @@
|
||||
// RUN: not %clang_cc1 -O1 %s -emit-llvm
|
||||
// PR6913
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user