aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/variable-array.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-04-20 03:21:44 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-04-20 03:21:44 +0000
commit3253e189c6465fe35fb9059310c478b75f57ff32 (patch)
tree04127cb7ccbb791990cd0a9e0b6ee7a3624429dc /clang/test/CodeGen/variable-array.c
parent23e1f45664f17e32c06146cda92601e5019c95b4 (diff)
downloadllvm-3253e189c6465fe35fb9059310c478b75f57ff32.zip
llvm-3253e189c6465fe35fb9059310c478b75f57ff32.tar.gz
llvm-3253e189c6465fe35fb9059310c478b75f57ff32.tar.bz2
PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.
Adapted from patch by Tim Northover. llvm-svn: 69566
Diffstat (limited to 'clang/test/CodeGen/variable-array.c')
-rw-r--r--clang/test/CodeGen/variable-array.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGen/variable-array.c b/clang/test/CodeGen/variable-array.c
new file mode 100644
index 0000000..280539f
--- /dev/null
+++ b/clang/test/CodeGen/variable-array.c
@@ -0,0 +1,7 @@
+// RUN: clang-cc -emit-llvm < %s | grep puts
+
+int a(int x)
+{
+ int (*y)[x];
+ return sizeof(*(puts("asdf"),y));
+}