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