Skip to content

Commit e43abf4

Browse files
committed
simpl: honor Global for "simpl: never" (Close: 3206)
It was an integer overflow! All sorts of memories.
1 parent eb3e8ef commit e43abf4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pretyping/reductionops.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ module ReductionBehaviour = struct
6464
if Lib.is_in_section (ConstRef c) then
6565
let vars, _, _ = Lib.section_segment_of_constant c in
6666
let extra = List.length vars in
67-
let nargs' = if b.b_nargs < 0 then b.b_nargs else b.b_nargs + extra in
67+
let nargs' =
68+
if b.b_nargs = max_int then max_int
69+
else if b.b_nargs < 0 then b.b_nargs
70+
else b.b_nargs + extra in
6871
let recargs' = List.map ((+) extra) b.b_recargs in
6972
{ b with b_nargs = nargs'; b_recargs = recargs' }
7073
else b

0 commit comments

Comments
 (0)