commit | e73e3ecc040425ff60404e6c62529f8e95fd8df5 | [log] [tgz] |
---|---|---|
author | Anders Carlsson <andersca@mac.com> | Tue Mar 17 05:53:35 2009 +0000 |
committer | Anders Carlsson <andersca@mac.com> | Tue Mar 17 05:53:35 2009 +0000 |
tree | 727a55867f5b43fa24eec397eed38e1bd967ff4f | |
parent | e8911a9a1327a4e93779cc092f8eb126dd7482f2 [diff] [blame] |
Initialize the cleanup.dst variable if necessary. Fixes PR3789. llvm-svn: 67075
diff --git a/clang/test/CodeGen/cleanup-stack.c b/clang/test/CodeGen/cleanup-stack.c new file mode 100644 index 0000000..360f6e7 --- /dev/null +++ b/clang/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; +}