Skip to content

Commit 726e799

Browse files
committed
.
1 parent dad7b3a commit 726e799

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

debug_test.ml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
(* module M = struct
2+
let[@inline never] f () = assert false
3+
let g () = if Sys.opaque_identity true then Int32.of_int 32 else f ()
4+
end
5+
6+
let _ =
7+
let a = M.g () in
8+
let b = Int32.to_int a + 1 in Printf.printf "%d" b
9+
*)
10+
module Int32_u = struct
11+
include Stdlib__Int32_u
12+
13+
let ( + ) = add
14+
let ( - ) = sub
15+
let ( * ) = mul
16+
let ( / ) = div
17+
let ( // ) = unsigned_div
18+
let ( % ) = rem
19+
let ( %% ) = unsigned_rem
20+
let ( = ) = equal
21+
end
22+
23+
let[@inline never] literal_test x y =
24+
let open Int32_u in
25+
match x with
26+
| #2l -> (#1l + x) * (y - #4l) / (#3l % #10l)
27+
| _ -> #0l
28+
29+
30+
let _ = Printf.printf "%ld" (Int32_u.to_int32 (literal_test #2l #3l))

ocaml/Makefile.common-jst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ runtime-stdlib: boot-compiler
7474
@touch _build/install/runtime_stdlib/lib/ocaml_runtime_stdlib/dynlink.cmxa
7575

7676
compiler: runtime-stdlib
77-
RUNTIME_DIR=$(RUNTIME_DIR) $(dune) build $(ws_main) --only-package=ocaml @install \
77+
RUNTIME_DIR=$(RUNTIME_DIR) $(dune) build $(ws_main) --display=verbose --only-package=ocaml @install \
7878
$(ocamldir)/ocamltest/ocamltest.byte \
7979
$(ocamldir)/tools/dumpobj.bc
8080

0 commit comments

Comments
 (0)