aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/vla.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/vla.c')
-rw-r--r--test/CodeGen/vla.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/vla.c b/test/CodeGen/vla.c
new file mode 100644
index 0000000000..a584020abc
--- /dev/null
+++ b/test/CodeGen/vla.c
@@ -0,0 +1,10 @@
+// RUN: clang %s -emit-llvm -o %t
+
+int b(char* x);
+
+// Extremely basic VLA test
+void a(int x) {
+ char arry[x];
+ arry[0] = 10;
+ b(arry);
+}