diff options
author | Anders Carlsson <andersca@mac.com> | 2009-03-17 05:53:35 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-03-17 05:53:35 +0000 |
commit | 0ae7b2b2f964bd6145d65ef52dc2a28025b2bd06 (patch) | |
tree | a660bcfa23438a39c2736d511427b549e1c3fc2c /test/CodeGen/cleanup-stack.c | |
parent | 4598ffab57ba948a323b0877d3d35b7d71d27a4c (diff) |
Initialize the cleanup.dst variable if necessary. Fixes PR3789.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/cleanup-stack.c')
-rw-r--r-- | test/CodeGen/cleanup-stack.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/cleanup-stack.c b/test/CodeGen/cleanup-stack.c new file mode 100644 index 0000000000..360f6e701b --- /dev/null +++ b/test/CodeGen/cleanup-stack.c @@ -0,0 +1,15 @@ +// RUN: clang -emit-llvm %s -o %t && +// RUN: grep "store i32 0, i32* %cleanup" %t | count 2 +void f(int n) { + int a[n]; + + { + int b[n]; + + if (n) + return; + } + + if (n) + return; +} |