| ... | ... | @@ -25394,6 +25394,7 @@ static IrInstruction *ir_analyze_instruction_decl_ref(IrAnalyze *ira, |
| 25394 | 25394 | } |
| 25395 | 25395 | |
| 25396 | 25396 | static IrInstruction *ir_analyze_instruction_ptr_to_int(IrAnalyze *ira, IrInstructionPtrToInt *instruction) { |
| 25397 | Error err; |
| 25397 | 25398 | IrInstruction *target = instruction->target->child; |
| 25398 | 25399 | if (type_is_invalid(target->value.type)) |
| 25399 | 25400 | return ira->codegen->invalid_instruction; |
| ... | ... | @@ -25407,6 +25408,8 @@ static IrInstruction *ir_analyze_instruction_ptr_to_int(IrAnalyze *ira, IrInstru |
| 25407 | 25408 | return ira->codegen->invalid_instruction; |
| 25408 | 25409 | } |
| 25409 | 25410 | |
| 25411 | if ((err = type_resolve(ira->codegen, target->value.type, ResolveStatusZeroBitsKnown))) |
| 25412 | return ira->codegen->invalid_instruction; |
| 25410 | 25413 | if (!type_has_bits(target->value.type)) { |
| 25411 | 25414 | ir_add_error(ira, target, |
| 25412 | 25415 | buf_sprintf("pointer to size 0 type has no address")); |