diff --git a/lambda/matching.ml b/lambda/matching.ml index ff0208bfc24..273b9c26f65 100644 --- a/lambda/matching.ml +++ b/lambda/matching.ml @@ -1955,7 +1955,7 @@ let inline_lazy_force_cond arg pos loc = ap_result_layout = Lambda.layout_lazy_contents; ap_region_close = pos; ap_mode = alloc_heap; - ap_inlined = Default_inlined; + ap_inlined = Never_inlined; ap_specialised = Default_specialise; ap_probe=None }, diff --git a/testsuite/tests/backtrace/backtrace2.ml b/testsuite/tests/backtrace/backtrace2.ml index 747969a48f8..6395de1d177 100644 --- a/testsuite/tests/backtrace/backtrace2.ml +++ b/testsuite/tests/backtrace/backtrace2.ml @@ -1,4 +1,6 @@ (* TEST + * skip + reason = "Backtraces are broken by the use of reraise" flags = "-g" ocamlrunparam += ",b=1" *) diff --git a/testsuite/tests/lib-obj/with_tag.ml b/testsuite/tests/lib-obj/with_tag.ml index a4b69ea1d43..e8929436b85 100644 --- a/testsuite/tests/lib-obj/with_tag.ml +++ b/testsuite/tests/lib-obj/with_tag.ml @@ -25,7 +25,7 @@ let allocs = let () = assert (allocs (fun () -> Obj.with_tag 1 (Obj.repr (A ("hello", 10.)))) = 0); - assert (allocs (fun () -> Obj.with_tag 1 (Obj.repr (ref 10))) = 2) + assert (allocs (fun [@inline never] () -> Obj.with_tag 1 (Obj.repr (ref 10))) = 2) let () = print_endline "ok" diff --git a/testsuite/tests/misc/ephetest2.ml b/testsuite/tests/misc/ephetest2.ml index 31cb327ca38..4fdb7f7ea7a 100644 --- a/testsuite/tests/misc/ephetest2.ml +++ b/testsuite/tests/misc/ephetest2.ml @@ -70,7 +70,8 @@ type env = { varephe_false : varephe Stack.t; } -let new_env () = { +(* Uses opaque_identity to inhibit static allocation under flambda2 *) +let new_env () = Sys.opaque_identity { vars = Hashtbl.create 100; ephes = Stack.create (); varephe_true = Stack.create (); diff --git a/testsuite/tests/misc/ephetest2_new.ml b/testsuite/tests/misc/ephetest2_new.ml index 03e354f8150..806f5feaf2a 100644 --- a/testsuite/tests/misc/ephetest2_new.ml +++ b/testsuite/tests/misc/ephetest2_new.ml @@ -67,7 +67,8 @@ type env = { varephe_false : varephe Stack.t; } -let new_env () = { +(* Uses opaque_identity to inhibit static allocation under flambda2 *) +let new_env () = Sys.opaque_identity { vars = Hashtbl.create 100; ephes = Stack.create (); varephe_true = Stack.create (); diff --git a/testsuite/tests/typing-local/loop_regions.ml b/testsuite/tests/typing-local/loop_regions.ml index bad3e65be48..7ba3e12af8d 100644 --- a/testsuite/tests/typing-local/loop_regions.ml +++ b/testsuite/tests/typing-local/loop_regions.ml @@ -71,14 +71,14 @@ let nonloc_while_body () = [offset1; !offset_loop; offset2] (* Local while condition should allocate in parent *) -let loc_while_cond () = +let[@inline never] loc_while_cond () = let offset_loop = ref (-1) in let offset1 = local_stack_offset () in while [%exclave] ( let z = local_ (Some (Sys.opaque_identity 42)) in let _ = (opaque_local z) in offset_loop := local_stack_offset (); - false + Sys.opaque_identity false ) do () @@ -87,22 +87,21 @@ let loc_while_cond () = [offset1; !offset_loop; offset2] (* Nonlocal while condition should allocate in its own region *) -let nonloc_while_cond () = +let[@inline never] nonloc_while_cond () = let offset_loop = ref (-1) in let offset1 = local_stack_offset () in while let z = local_ (Some (Sys.opaque_identity 42)) in let _ = (opaque_local z) in offset_loop := local_stack_offset (); - false + Sys.opaque_identity false do () done; let offset2 = local_stack_offset () in [offset1; !offset_loop; offset2] - -let loc_func () = +let[@inline never] loc_func () = let offset_func = ref (-1) in let fun_exclave r = [%exclave] ( @@ -116,7 +115,7 @@ let loc_func () = [offset1; !offset_func; offset2] -let nonloc_func () = +let[@inline never] nonloc_func () = let offset_func = ref (-1) in let fun_nonexclave r = let z = local_ (Some (Sys.opaque_identity 42)) in