From bc646d01c501f2566fd78057e23c283cfedc0eb0 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 13 Sep 2010 13:37:24 -0700 Subject: Fix leaking arg slots on tail calls. Closes #160. --- src/test/run-pass/tail-call-arg-leak.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/test/run-pass/tail-call-arg-leak.rs (limited to 'src/test') diff --git a/src/test/run-pass/tail-call-arg-leak.rs b/src/test/run-pass/tail-call-arg-leak.rs new file mode 100644 index 00000000..d99ceaec --- /dev/null +++ b/src/test/run-pass/tail-call-arg-leak.rs @@ -0,0 +1,11 @@ +// use of tail calls causes arg slot leaks, issue #160. + +fn inner(str dummy, bool b) { + if (b) { + be inner(dummy, false); + } +} + +fn main() { + inner("hi", true); +} -- cgit v1.2.3