summaryrefslogtreecommitdiff
path: root/testsuite/tests/tool-ocaml/t251-pushoffsetclosurem2.ml
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/tool-ocaml/t251-pushoffsetclosurem2.ml')
-rw-r--r--testsuite/tests/tool-ocaml/t251-pushoffsetclosurem2.ml34
1 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/tests/tool-ocaml/t251-pushoffsetclosurem2.ml b/testsuite/tests/tool-ocaml/t251-pushoffsetclosurem2.ml
new file mode 100644
index 0000000000..41ec196c35
--- /dev/null
+++ b/testsuite/tests/tool-ocaml/t251-pushoffsetclosurem2.ml
@@ -0,0 +1,34 @@
+open Lib;;
+let rec f _ = 4
+ and g _ = f 2
+in
+if g 5 <> 4 then raise Not_found
+;;
+
+(**
+ 0 CONSTINT 42
+ 2 PUSHACC0
+ 3 MAKEBLOCK1 0
+ 5 POP 1
+ 7 SETGLOBAL Lib
+ 9 BRANCH 19
+ 11 CONSTINT 4
+ 13 RETURN 1
+ 15 CONST2
+ 16 PUSHOFFSETCLOSUREM2
+ 17 APPTERM1 2
+ 19 CLOSUREREC 0, 11, 15
+ 24 CONSTINT 4
+ 26 PUSHCONSTINT 5
+ 28 PUSHACC2
+ 29 APPLY1
+ 30 NEQ
+ 31 BRANCHIFNOT 38
+ 33 GETGLOBAL Not_found
+ 35 MAKEBLOCK1 0
+ 37 RAISE
+ 38 POP 2
+ 40 ATOM0
+ 41 SETGLOBAL T251-pushoffsetclosurem2
+ 43 STOP
+**)