Tolerate overaligned MIR constants for codegen.
This commit is contained in:
parent
4283aeaca5
commit
3ea5cfaa11
2 changed files with 32 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