diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs index ba995afddc81..61c3c6f24ffb 100644 --- a/src/librustc_mir/interpret/operand.rs +++ b/src/librustc_mir/interpret/operand.rs @@ -295,7 +295,7 @@ pub(super) fn try_read_immediate_from_mplace( let a_val = self.memory .get(ptr.alloc_id)? .read_scalar(self, a_ptr, a_size)?; - self.memory.check_align(b_ptr.into(), b.align(self))?; + self.memory.check_align(b_ptr.into(), b.align(self).min(ptr_align))?; let b_val = self.memory .get(ptr.alloc_id)? .read_scalar(self, b_ptr, b_size)?;