summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/sizeof-vla.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/sizeof-vla.c')
-rw-r--r--clang/test/CodeGen/sizeof-vla.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGen/sizeof-vla.c b/clang/test/CodeGen/sizeof-vla.c
new file mode 100644
index 0000000..c5fc912
--- /dev/null
+++ b/clang/test/CodeGen/sizeof-vla.c
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o %t %s
+
+// PR3442
+
+void *g(unsigned long len);
+
+void
+f(int n)
+{
+ unsigned begin_set[n];
+
+ g(sizeof(begin_set));
+}