summaryrefslogtreecommitdiff
path: root/testsuite/tests/backtrace/event_after_prim.ml
blob: f8f54c4f4050f56a64e9ad087bd7e02528662d16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(* TEST_BELOW
(* Blank lines added here to preserve locations. *)
*)

let f n b =
  let arr = Array.make n 42 in
  if b then (arr, [| |]) else ([| |], arr)

let () =
  Printexc.record_backtrace true;
  match Sys.opaque_identity f (-1) true with
  | _ -> assert false
  | exception _ ->
    Printexc.print_backtrace stdout

(* TEST
 flags = "-g";
*)