Skip to content

Commit 9beea69

Browse files
committed
Use immediate_backend_type when reading from a const alloc
1 parent 2b399b5 commit 9beea69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_codegen_ssa/src/mir/operand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
155155
Abi::Scalar(s @ abi::Scalar::Initialized { .. }) => {
156156
let size = s.size(bx);
157157
assert_eq!(size, layout.size, "abi::Scalar size does not match layout size");
158-
let val = read_scalar(offset, size, s, bx.backend_type(layout));
158+
let val = read_scalar(offset, size, s, bx.immediate_backend_type(layout));
159159
OperandRef { val: OperandValue::Immediate(val), layout }
160160
}
161161
Abi::ScalarPair(

0 commit comments

Comments
 (0)