| ... | ... | @@ -5030,11 +5030,10 @@ static IrInstruction *ir_analyze_maybe_wrap(IrAnalyze *ira, IrInstruction *sourc |
| 5030 | 5030 | static IrInstruction *ir_analyze_pointer_reinterpret(IrAnalyze *ira, IrInstruction *source_instr, |
| 5031 | 5031 | IrInstruction *ptr, TypeTableEntry *wanted_type) |
| 5032 | 5032 | { |
| 5033 | | assert(wanted_type->id == TypeTableEntryIdPointer); |
| 5034 | | |
| 5035 | | if (ptr->value.type->id != TypeTableEntryIdPointer) { |
| 5036 | | ir_add_error(ira, ptr, |
| 5037 | | buf_sprintf("expected pointer, found '%s'", buf_ptr(&ptr->value.type->name))); |
| 5033 | if (ptr->value.type->id != TypeTableEntryIdPointer && |
| 5034 | ptr->value.type->id != TypeTableEntryIdMaybe) |
| 5035 | { |
| 5036 | ir_add_error(ira, ptr, buf_sprintf("expected pointer, found '%s'", buf_ptr(&ptr->value.type->name))); |
| 5038 | 5037 | return ira->codegen->invalid_instruction; |
| 5039 | 5038 | } |
| 5040 | 5039 | |