|
@@ -1626,7 +1626,10 @@ and gen_binop ctx retval op e1 e2 t p =
|
|
|
let k1 = classify ctx e1.etype in
|
|
|
let k2 = classify ctx e2.etype in
|
|
|
(match k1, k2 with
|
|
|
- | KInt, KInt | KUInt, KUInt | KInt, KUInt | KUInt, KInt -> write ctx (HOp iop)
|
|
|
+ | KInt, KInt | KUInt, KUInt | KInt, KUInt | KUInt, KInt ->
|
|
|
+ write ctx (HOp iop);
|
|
|
+ let ret = classify ctx t in
|
|
|
+ if ret <> KInt then coerce ctx ret
|
|
|
| _ ->
|
|
|
write ctx (HOp op);
|
|
|
(* add is a generic operation, so let's make sure we don't loose our type in the process *)
|