From 6852c616edf9fc7ff27e8367d7f72a5d88f32d8c Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 16 Apr 2007 21:13:57 +0000 Subject: [PATCH] Test code quality for variable length array references. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36163 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CFrontend/2007-03-27-VarLengthArray.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/CFrontend/2007-03-27-VarLengthArray.c diff --git a/test/CFrontend/2007-03-27-VarLengthArray.c b/test/CFrontend/2007-03-27-VarLengthArray.c new file mode 100644 index 00000000000..5bebe9b09e2 --- /dev/null +++ b/test/CFrontend/2007-03-27-VarLengthArray.c @@ -0,0 +1,7 @@ +// RUN: %llvmgcc -S %s -o - | grep {getelementptr i32} +extern void f(int *); +int e(int m, int n) { + int x[n]; + f(x); + return x[m]; +} -- 2.34.1