summaryrefslogtreecommitdiff
path: root/testsuite/tests/tool-ocaml/t270-push_retaddr.ml
diff options
context:
space:
mode:
authorXavier Clerc <xavier.clerc@inria.fr>2010-01-25 14:23:07 +0000
committerXavier Clerc <xavier.clerc@inria.fr>2010-01-25 14:23:07 +0000
commitb9aea322525fadbc401c525739550a7a77209f2c (patch)
tree357f8fff6f8adfc3b83ba2d8f0d533e41f34852a /testsuite/tests/tool-ocaml/t270-push_retaddr.ml
parent1c8ffcff228613bb08378d255c281e3a5575fd71 (diff)
downloadocaml-b9aea322525fadbc401c525739550a7a77209f2c.tar.gz
Tests moved to 'tool-ocaml'
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9579 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'testsuite/tests/tool-ocaml/t270-push_retaddr.ml')
-rw-r--r--testsuite/tests/tool-ocaml/t270-push_retaddr.ml36
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/tests/tool-ocaml/t270-push_retaddr.ml b/testsuite/tests/tool-ocaml/t270-push_retaddr.ml
new file mode 100644
index 0000000000..0c7fb369bf
--- /dev/null
+++ b/testsuite/tests/tool-ocaml/t270-push_retaddr.ml
@@ -0,0 +1,36 @@
+open Lib;;
+let f a b c d = 123 in
+if f 0 1 2 3 <> 123 then raise Not_found
+;;
+
+(**
+ 0 CONSTINT 42
+ 2 PUSHACC0
+ 3 MAKEBLOCK1 0
+ 5 POP 1
+ 7 SETGLOBAL Lib
+ 9 BRANCH 18
+ 11 RESTART
+ 12 GRAB 3
+ 14 CONSTINT 123
+ 16 RETURN 4
+ 18 CLOSURE 0, 12
+ 21 PUSHCONSTINT 123
+ 23 PUSH
+ 24 PUSH_RETADDR 34
+ 26 CONST3
+ 27 PUSHCONST2
+ 28 PUSHCONST1
+ 29 PUSHCONST0
+ 30 PUSHACC 8
+ 32 APPLY 4
+ 34 NEQ
+ 35 BRANCHIFNOT 42
+ 37 GETGLOBAL Not_found
+ 39 MAKEBLOCK1 0
+ 41 RAISE
+ 42 POP 1
+ 44 ATOM0
+ 45 SETGLOBAL T270-push_retaddr
+ 47 STOP
+**)