diff options
Diffstat (limited to 'testsuite/tests/regression/pr9443/pr9443.ml')
-rw-r--r-- | testsuite/tests/regression/pr9443/pr9443.ml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/regression/pr9443/pr9443.ml b/testsuite/tests/regression/pr9443/pr9443.ml new file mode 100644 index 0000000000..8a72cd0839 --- /dev/null +++ b/testsuite/tests/regression/pr9443/pr9443.ml @@ -0,0 +1,11 @@ +(* TEST *) + +(* Test tail call optimisation with an elided mutable cell *) +let rec loop n = + if n = 0 then () else begin + let last = ref 0 in + last := 0; + loop (n-1) + end + +let () = loop 1_000_000 |