Skip to content

Commit d05542a

Browse files
committed
Add missing cast in gcc_checked_binop
1 parent d3a61f8 commit d05542a

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
@@ -367,6 +367,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
367367
let new_type = self.context.new_c_type(new_type);
368368
let lhs = self.context.new_cast(self.location, lhs, new_type);
369369
let rhs = self.context.new_cast(self.location, rhs, new_type);
370+
let res = self.context.new_cast(self.location, res, new_type.make_pointer());
370371
let overflow = self.overflow_call(intrinsic, &[lhs, rhs, res], None);
371372
(res.dereference(self.location).to_rvalue(), overflow)
372373
}

0 commit comments

Comments
 (0)