| ... | ... | @@ -3349,7 +3349,7 @@ static LLVMValueRef ir_render_ptr_of_array_to_slice(CodeGen *g, IrExecutableGen |
| 3349 | 3349 | LLVMValueRef expr_val = ir_llvm_value(g, instruction->operand); |
| 3350 | 3350 | LLVMValueRef slice_start_ptr = LLVMBuildInBoundsGEP(g->builder, expr_val, indices, 2, ""); |
| 3351 | 3351 | gen_store_untyped(g, slice_start_ptr, ptr_field_ptr, 0, false); |
| 3352 | | } else if (ir_want_runtime_safety(g, &instruction->base)) { |
| 3352 | } else if (ir_want_runtime_safety(g, &instruction->base) && ptr_index != SIZE_MAX) { |
| 3353 | 3353 | LLVMValueRef ptr_field_ptr = LLVMBuildStructGEP(g->builder, result_loc, ptr_index, ""); |
| 3354 | 3354 | gen_undef_init(g, slice_ptr_type, slice_ptr_type, ptr_field_ptr); |
| 3355 | 3355 | } |