Fix miscompilation in vtable access

Fixes #1179
This commit is contained in:
bjorn3 2021-06-17 18:41:43 +02:00
parent a12e23bc7e
commit ab7f1c8a0e

View File

@ -38,7 +38,7 @@ pub(crate) fn min_align_of_obj(fx: &mut FunctionCx<'_, '_, '_>, vtable: Value) -
pointer_ty(fx.tcx), pointer_ty(fx.tcx),
vtable_memflags(), vtable_memflags(),
vtable, vtable,
(ty::COMMON_VTABLE_ENTRIES_SIZE * usize_size) as i32, (ty::COMMON_VTABLE_ENTRIES_ALIGN * usize_size) as i32,
) )
} }