1
Fork 0

Tolerate overaligned MIR constants for codegen.

This commit is contained in:
Camille GILLOT 2023-12-17 22:56:42 +00:00
parent 4283aeaca5
commit 3ea5cfaa11
2 changed files with 32 additions and 1 deletions

View file

@ -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(