diff options
| author | bors <bors@rust-lang.org> | 2023-12-21 04:01:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-12-21 04:01:36 +0000 |
| commit | 920e0051cf7b80e7ea00c4fadc482e8b70f2e81b (patch) | |
| tree | 3ffbe4041894ae69dd5530555a07a933f5eba231 /compiler/rustc_codegen_ssa/src | |
| parent | 3694a6b20af1c4fa228da613e23073c583b9068b (diff) | |
| parent | 503af0deb2789e35f7c1b0b61c5f0e5ddf8425db (diff) | |
| download | rust-920e0051cf7b80e7ea00c4fadc482e8b70f2e81b.tar.gz rust-920e0051cf7b80e7ea00c4fadc482e8b70f2e81b.zip | |
Auto merge of #119056 - cjgillot:codegen-overalign, r=wesleywiser
Tolerate overaligned MIR constants for codegen. Fixes https://github.com/rust-lang/rust/issues/117761 cc `@saethlin`
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/operand.rs | 2 |
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( |
