Skip to content

Commit 3c35d9b

Browse files
committed
Add missing cast in gcc_checked_binop
1 parent 041be62 commit 3c35d9b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/int.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
366366
let new_type = type_kind_to_gcc_type(new_kind);
367367
let new_type = self.context.new_c_type(new_type);
368368
let lhs = self.context.new_cast(self.location, lhs, new_type);
369+
let rhs = self.context.new_cast(self.location, rhs, new_type);
369370
let overflow = self.overflow_call(intrinsic, &[lhs, rhs, res], None);
370371
(res.dereference(self.location).to_rvalue(), overflow)
371372
}

0 commit comments

Comments
 (0)