From 3ea5cfaa11ce82b3d16385e16b770b4749463406 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Sun, 17 Dec 2023 22:56:42 +0000 Subject: Tolerate overaligned MIR constants for codegen. --- compiler/rustc_codegen_ssa/src/mir/operand.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_ssa/src') diff --git a/compiler/rustc_codegen_ssa/src/mir/operand.rs b/compiler/rustc_codegen_ssa/src/mir/operand.rs index e8c58f6b6f8..794cbd315b7 100644 --- a/compiler/rustc_codegen_ssa/src/mir/operand.rs +++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs @@ -132,7 +132,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> { offset: Size, ) -> Self { let alloc_align = alloc.inner().align; - assert_eq!(alloc_align, layout.align.abi); + assert!(alloc_align >= layout.align.abi); let read_scalar = |start, size, s: abi::Scalar, ty| { match alloc.0.read_scalar( -- cgit 1.4.1-3-g733a5