aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMaxime Dénès2019-04-04 00:28:15 +0200
committerMaxime Dénès2019-04-05 21:16:14 +0200
commit44a669e591ee00bcea65b229429dcb5d4d3515ec (patch)
treed3b631c15fef018d8ca87fe4db92f92bc51d3e71 /kernel
parent73e7bbab4ff6120318ec7b90e4971bfafd09cfb5 (diff)
[native compiler] Fix critical bug with primitive projections
Since e1e7888, stuck projections were not computed correctly. Fixes #9684
Diffstat (limited to 'kernel')
-rw-r--r--kernel/nativecode.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/nativecode.ml b/kernel/nativecode.ml
index 2dab14e732..94ed288d2d 100644
--- a/kernel/nativecode.ml
+++ b/kernel/nativecode.ml
@@ -1958,7 +1958,7 @@ let compile_mind mb mind stack =
let cargs = Array.init arity
(fun i -> if Int.equal i proj_arg then Some ci_uid else None)
in
- let i = push_symbol (SymbProj (ind, j)) in
+ let i = push_symbol (SymbProj (ind, proj_arg)) in
let accu = MLapp (MLprimitive Cast_accu, [|MLlocal cf_uid|]) in
let accu_br = MLapp (MLprimitive Mk_proj, [|get_proj_code i;accu|]) in
let code = MLmatch(asw,MLlocal cf_uid,accu_br,[|[((ind,1),cargs)],MLlocal ci_uid|]) in