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`
This commit is contained in:
commit
920e0051cf
2 changed files with 37 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue