aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/tail-call-arg-leak.rs11
1 files changed, 11 insertions, 0 deletions
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);
+}