Skip to content

Commit 0a4077f

Browse files
Fix invalid cg_gcc panic function cast
1 parent 8474bb0 commit 0a4077f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/intrinsic/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,10 @@ fn try_intrinsic<'a, 'b, 'gcc, 'tcx>(
13521352
dest: PlaceRef<'tcx, RValue<'gcc>>,
13531353
) {
13541354
if !bx.sess().panic_strategy().unwinds() {
1355-
bx.call(bx.type_void(), None, None, try_func, &[data], None, None);
1355+
let param_type = bx.u8_type.make_pointer();
1356+
let fn_type =
1357+
bx.context.new_function_pointer_type(None, bx.type_void(), &[param_type], false);
1358+
bx.call(fn_type, None, None, try_func, &[data], None, None);
13561359
// Return 0 unconditionally from the intrinsic call;
13571360
// we can never unwind.
13581361
OperandValue::Immediate(bx.const_i32(0)).store(bx, dest);

0 commit comments

Comments
 (0)