summaryrefslogtreecommitdiff
path: root/testsuite/tests/asmgen/catch-rec.cmm
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/asmgen/catch-rec.cmm')
-rw-r--r--testsuite/tests/asmgen/catch-rec.cmm5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/tests/asmgen/catch-rec.cmm b/testsuite/tests/asmgen/catch-rec.cmm
new file mode 100644
index 0000000000..69208f5f4a
--- /dev/null
+++ b/testsuite/tests/asmgen/catch-rec.cmm
@@ -0,0 +1,5 @@
+(function "catch_fact" (b:int)
+ (catch (exit fact b 1)
+ with (fact c acc)
+ (if (== c 0) acc
+ (exit fact (- c 1) ( * c acc)))))