summaryrefslogtreecommitdiff
path: root/test/doublecall.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-02-21 00:03:11 -0500
committerOri Bernstein <ori@eigenstate.org>2014-02-21 00:03:11 -0500
commit1a2c2337f0d396de9433341d799b99882635bcac (patch)
tree8b0a0c286ae1d3c92ce89370cbf517674369276e /test/doublecall.myr
parentbf18e66ef2986eb84e884297404c38da668ab7a2 (diff)
downloadmc-1a2c2337f0d396de9433341d799b99882635bcac.tar.gz
Fix subsequent function calls.
Icall was failing to clobber all return register sizes, meaning that multiple calls without stack stores, and different return sizes, would step on each other's return values.
Diffstat (limited to 'test/doublecall.myr')
-rw-r--r--test/doublecall.myr13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/doublecall.myr b/test/doublecall.myr
new file mode 100644
index 0000000..efaa921
--- /dev/null
+++ b/test/doublecall.myr
@@ -0,0 +1,13 @@
+use std
+
+const main = {
+ std.put("%i,%w\n", a(), b())
+}
+
+const a = {
+ -> 42
+}
+
+const b = {
+ -> 33 castto(int16)
+}