提交 5258e13d 编写于 作者: C Corey Richardson

test/run-pass/out-of-stack: prevent tco

We really do *not* want TCO to kick in. If it does, we'll never blow the
stack, and never trigger the condition the test is checking for. To that end,
do a meaningless alloc that serves only to get a destructor to run. The
addition of nocapture/noalias seems to have let LLVM do more TCO, which
hurt this testcase.
上级 b8ed1368
......@@ -28,6 +28,7 @@ fn silent_recurse() {
fn loud_recurse() {
println!("hello!");
loud_recurse();
black_box(()); // don't optimize this into a tail call. please.
}
fn main() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册