summaryrefslogtreecommitdiff
path: root/ocaml-binary-annot/testsuite/tests/tool-ocaml/t130-getvectitem.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml-binary-annot/testsuite/tests/tool-ocaml/t130-getvectitem.ml')
-rw-r--r--ocaml-binary-annot/testsuite/tests/tool-ocaml/t130-getvectitem.ml24
1 files changed, 24 insertions, 0 deletions
diff --git a/ocaml-binary-annot/testsuite/tests/tool-ocaml/t130-getvectitem.ml b/ocaml-binary-annot/testsuite/tests/tool-ocaml/t130-getvectitem.ml
new file mode 100644
index 0000000000..d290379592
--- /dev/null
+++ b/ocaml-binary-annot/testsuite/tests/tool-ocaml/t130-getvectitem.ml
@@ -0,0 +1,24 @@
+open Lib;;
+if [| 1; 2 |].(1) <> 2 then raise Not_found;;
+
+(**
+ 0 CONSTINT 42
+ 2 PUSHACC0
+ 3 MAKEBLOCK1 0
+ 5 POP 1
+ 7 SETGLOBAL Lib
+ 9 CONST2
+ 10 PUSHCONST1
+ 11 PUSHCONST2
+ 12 PUSHCONST1
+ 13 MAKEBLOCK2 0
+ 15 GETVECTITEM
+ 16 NEQ
+ 17 BRANCHIFNOT 24
+ 19 GETGLOBAL Not_found
+ 21 MAKEBLOCK1 0
+ 23 RAISE
+ 24 ATOM0
+ 25 SETGLOBAL T130-getvectitem
+ 27 STOP
+**)