diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-18 18:44:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-18 18:44:14 +0200 |
| commit | e4e75688c2aaedbd0b6e863d3cb1dfc5d914e330 (patch) | |
| tree | cfbd0179cbfa7f734cf0ad353c0163293a6a90dd /compiler/rustc_codegen_ssa/src | |
| parent | f9bf759e833f21edfa99ea63cc0fc57cf575227e (diff) | |
| parent | f60f2e8cb07d21b7d5b0fa7f96dacd2e806b98e4 (diff) | |
| download | rust-e4e75688c2aaedbd0b6e863d3cb1dfc5d914e330.tar.gz rust-e4e75688c2aaedbd0b6e863d3cb1dfc5d914e330.zip | |
Rollup merge of #125184 - scottmcm:fix-thin-ptr-ice, r=jieyouxu
Fix ICE in non-operand `aggregate_raw_ptr` intrinsic codegen Introduced in #123840 Found in #121571, cc `@clarfonthey`
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index 936ed41a294..ff176a79675 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -121,7 +121,11 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { bx.write_operand_repeatedly(cg_elem, count, dest); } - mir::Rvalue::Aggregate(ref kind, ref operands) => { + // This implementation does field projection, so never use it for `RawPtr`, + // which will always be fine with the `codegen_rvalue_operand` path below. + mir::Rvalue::Aggregate(ref kind, ref operands) + if !matches!(**kind, mir::AggregateKind::RawPtr(..)) => + { let (variant_index, variant_dest, active_field_index) = match **kind { mir::AggregateKind::Adt(_, variant_index, _, _, active_field_index) => { let variant_dest = dest.project_downcast(bx, variant_index); |
