| ... | @@ -3212,7 +3212,6 @@ static IrInstruction *ir_build_suspend_br(IrBuilder *irb, Scope *scope, AstNode | ... | @@ -3212,7 +3212,6 @@ static IrInstruction *ir_build_suspend_br(IrBuilder *irb, Scope *scope, AstNode |
| 3212 | IrBasicBlock *resume_block) | 3212 | IrBasicBlock *resume_block) |
| 3213 | { | 3213 | { |
| 3214 | IrInstructionSuspendBr *instruction = ir_build_instruction<IrInstructionSuspendBr>(irb, scope, source_node); | 3214 | IrInstructionSuspendBr *instruction = ir_build_instruction<IrInstructionSuspendBr>(irb, scope, source_node); |
| 3215 | instruction->base.value.type = irb->codegen->builtin_types.entry_unreachable; | | |
| 3216 | instruction->resume_block = resume_block; | 3215 | instruction->resume_block = resume_block; |
| 3217 | | 3216 | |
| 3218 | ir_ref_bb(resume_block); | 3217 | ir_ref_bb(resume_block); |
| ... | @@ -7744,6 +7743,7 @@ static IrInstruction *ir_gen_suspend(IrBuilder *irb, Scope *parent_scope, AstNod | ... | @@ -7744,6 +7743,7 @@ static IrInstruction *ir_gen_suspend(IrBuilder *irb, Scope *parent_scope, AstNod |
| 7744 | } | 7743 | } |
| 7745 | | 7744 | |
| 7746 | IrInstruction *result = ir_build_suspend_br(irb, parent_scope, node, resume_block); | 7745 | IrInstruction *result = ir_build_suspend_br(irb, parent_scope, node, resume_block); |
| | 7746 | result->value.type = irb->codegen->builtin_types.entry_void; |
| 7747 | ir_set_cursor_at_end_and_append_block(irb, resume_block); | 7747 | ir_set_cursor_at_end_and_append_block(irb, resume_block); |
| 7748 | return result; | 7748 | return result; |
| 7749 | } | 7749 | } |
| ... | @@ -10279,7 +10279,7 @@ static IrBasicBlock *ir_get_new_bb_runtime(IrAnalyze *ira, IrBasicBlock *old_bb, | ... | @@ -10279,7 +10279,7 @@ static IrBasicBlock *ir_get_new_bb_runtime(IrAnalyze *ira, IrBasicBlock *old_bb, |
| 10279 | } | 10279 | } |
| 10280 | | 10280 | |
| 10281 | static void ir_start_bb(IrAnalyze *ira, IrBasicBlock *old_bb, IrBasicBlock *const_predecessor_bb) { | 10281 | static void ir_start_bb(IrAnalyze *ira, IrBasicBlock *old_bb, IrBasicBlock *const_predecessor_bb) { |
| 10282 | ir_assert(!old_bb->suspended, old_bb->instruction_list.at(0)); | 10282 | ir_assert(!old_bb->suspended, (old_bb->instruction_list.length != 0) ? old_bb->instruction_list.at(0) : nullptr); |
| 10283 | ira->instruction_index = 0; | 10283 | ira->instruction_index = 0; |
| 10284 | ira->old_irb.current_basic_block = old_bb; | 10284 | ira->old_irb.current_basic_block = old_bb; |
| 10285 | ira->const_predecessor_bb = const_predecessor_bb; | 10285 | ira->const_predecessor_bb = const_predecessor_bb; |
| ... | @@ -22547,7 +22547,7 @@ static IrInstruction *ir_analyze_instruction_check_statement_is_void(IrAnalyze * | ... | @@ -22547,7 +22547,7 @@ static IrInstruction *ir_analyze_instruction_check_statement_is_void(IrAnalyze * |
| 22547 | if (type_is_invalid(statement_type)) | 22547 | if (type_is_invalid(statement_type)) |
| 22548 | return ira->codegen->invalid_instruction; | 22548 | return ira->codegen->invalid_instruction; |
| 22549 | | 22549 | |
| 22550 | if (statement_type->id != ZigTypeIdVoid) { | 22550 | if (statement_type->id != ZigTypeIdVoid && statement_type->id != ZigTypeIdUnreachable) { |
| 22551 | ir_add_error(ira, &instruction->base, buf_sprintf("expression value is ignored")); | 22551 | ir_add_error(ira, &instruction->base, buf_sprintf("expression value is ignored")); |
| 22552 | } | 22552 | } |
| 22553 | | 22553 | |
| ... | @@ -24147,6 +24147,7 @@ static IrInstruction *ir_analyze_instruction_suspend_br(IrAnalyze *ira, IrInstru | ... | @@ -24147,6 +24147,7 @@ static IrInstruction *ir_analyze_instruction_suspend_br(IrAnalyze *ira, IrInstru |
| 24147 | | 24147 | |
| 24148 | IrInstruction *result = ir_build_suspend_br(&ira->new_irb, | 24148 | IrInstruction *result = ir_build_suspend_br(&ira->new_irb, |
| 24149 | instruction->base.scope, instruction->base.source_node, new_bb); | 24149 | instruction->base.scope, instruction->base.source_node, new_bb); |
| | 24150 | result->value.type = ira->codegen->builtin_types.entry_unreachable; |
| 24150 | return ir_finish_anal(ira, result); | 24151 | return ir_finish_anal(ira, result); |
| 24151 | } | 24152 | } |
| 24152 | | 24153 | |