aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Linearizeaux.ml
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2020-03-13 14:13:52 +0100
committerCyril SIX <cyril.six@kalray.eu>2020-03-13 14:13:52 +0100
commitafa0407bc6474cbb1b519544ec0386ba7502ca62 (patch)
tree27e1dc9b10e0aebcb11ff4a18440581812c4c728 /backend/Linearizeaux.ml
parentdd345b4fd33a9e59507029f30da9a09d5e450db6 (diff)
downloadcompcert-kvx-afa0407bc6474cbb1b519544ec0386ba7502ca62.tar.gz
compcert-kvx-afa0407bc6474cbb1b519544ec0386ba7502ca62.zip
More helpful debug info in linearize
Diffstat (limited to 'backend/Linearizeaux.ml')
-rw-r--r--backend/Linearizeaux.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/Linearizeaux.ml b/backend/Linearizeaux.ml
index 5b3384f2..23ced4c2 100644
--- a/backend/Linearizeaux.ml
+++ b/backend/Linearizeaux.ml
@@ -168,7 +168,9 @@ let forward_sequences code entry =
| Lcond (_, _, ifso, ifnot, info) -> (match info with
| None -> begin Printf.printf "STOP Lcond None\n"; ([], [ifso; ifnot]) end
| Some false -> let ln, rem = traverse_fallthrough code ifnot in (ln, [ifso] @ rem)
- | Some true -> failwith "Inconsistency detected: ifnot is not the preferred branch")
+ | Some true ->
+ let errstr = Printf.sprintf ("Inconsistency detected in node %d: ifnot is not the preferred branch") (P.to_int node) in
+ failwith errstr)
| Ljumptable(_, ln) -> begin Printf.printf "STOP Ljumptable\n"; ([], ln) end
in ([node] @ ln, rem)
end