diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-19 19:20:22 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-09-23 14:07:10 +0000 |
| commit | 699240567446ba9d794b7e4883831ae13aadac59 (patch) | |
| tree | dcdef508b53a3a7c8680e725ae48b798500f22d7 | |
| parent | 3050938abd423f9e37466cc4cd4129c9b8cc427c (diff) | |
Tolerate non-ptr indirect scalars in codegen.
| -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 9205acc527e..63de6a72072 100644 --- a/compiler/rustc_codegen_ssa/src/mir/operand.rs +++ b/compiler/rustc_codegen_ssa/src/mir/operand.rs @@ -156,7 +156,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> { Abi::Scalar(s @ abi::Scalar::Initialized { .. }) => { let size = s.size(bx); assert_eq!(size, layout.size, "abi::Scalar size does not match layout size"); - let val = read_scalar(Size::ZERO, size, s, bx.type_ptr()); + let val = read_scalar(Size::ZERO, size, s, bx.backend_type(layout)); OperandRef { val: OperandValue::Immediate(val), layout } } Abi::ScalarPair( |
