about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-12-17 22:56:42 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-12-17 22:56:42 +0000
commit3ea5cfaa11ce82b3d16385e16b770b4749463406 (patch)
treee3b94d84f4910de9304255645e6da1f17f1a472a /compiler/rustc_codegen_ssa/src
parent4283aeaca5c0c14864d4af3369a42c6b8b21f80f (diff)
downloadrust-3ea5cfaa11ce82b3d16385e16b770b4749463406.tar.gz
rust-3ea5cfaa11ce82b3d16385e16b770b4749463406.zip
Tolerate overaligned MIR constants for codegen.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/operand.rs2
1 files changed, 1 insertions, 1 deletions
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(