| ... | @@ -15821,9 +15821,13 @@ static TypeTableEntry *ir_analyze_instruction_slice(IrAnalyze *ira, IrInstructio | ... | @@ -15821,9 +15821,13 @@ static TypeTableEntry *ir_analyze_instruction_slice(IrAnalyze *ira, IrInstructio |
| 15821 | TypeTableEntry *return_type; | 15821 | TypeTableEntry *return_type; |
| 15822 | | 15822 | |
| 15823 | if (array_type->id == TypeTableEntryIdArray) { | 15823 | if (array_type->id == TypeTableEntryIdArray) { |
| | 15824 | uint32_t byte_alignment = ptr_type->data.pointer.alignment; |
| | 15825 | if (array_type->data.array.len == 0 && byte_alignment == 0) { |
| | 15826 | byte_alignment = get_abi_alignment(ira->codegen, array_type->data.array.child_type); |
| | 15827 | } |
| 15824 | TypeTableEntry *slice_ptr_type = get_pointer_to_type_extra(ira->codegen, array_type->data.array.child_type, | 15828 | TypeTableEntry *slice_ptr_type = get_pointer_to_type_extra(ira->codegen, array_type->data.array.child_type, |
| 15825 | ptr_type->data.pointer.is_const, ptr_type->data.pointer.is_volatile, | 15829 | ptr_type->data.pointer.is_const, ptr_type->data.pointer.is_volatile, |
| 15826 | ptr_type->data.pointer.alignment, 0, 0); | 15830 | byte_alignment, 0, 0); |
| 15827 | return_type = get_slice_type(ira->codegen, slice_ptr_type); | 15831 | return_type = get_slice_type(ira->codegen, slice_ptr_type); |
| 15828 | } else if (array_type->id == TypeTableEntryIdPointer) { | 15832 | } else if (array_type->id == TypeTableEntryIdPointer) { |
| 15829 | TypeTableEntry *slice_ptr_type = get_pointer_to_type_extra(ira->codegen, array_type->data.pointer.child_type, | 15833 | TypeTableEntry *slice_ptr_type = get_pointer_to_type_extra(ira->codegen, array_type->data.pointer.child_type, |