| ... | @@ -5849,7 +5849,7 @@ static IrInstruction *ir_exec_const_result(CodeGen *codegen, IrExecutable *exec) | ... | @@ -5849,7 +5849,7 @@ static IrInstruction *ir_exec_const_result(CodeGen *codegen, IrExecutable *exec) |
| 5849 | return codegen->invalid_instruction; | 5849 | return codegen->invalid_instruction; |
| 5850 | } | 5850 | } |
| 5851 | } | 5851 | } |
| 5852 | zig_unreachable(); | 5852 | return codegen->invalid_instruction; |
| 5853 | } | 5853 | } |
| 5854 | | 5854 | |
| 5855 | static bool ir_emit_global_runtime_side_effect(IrAnalyze *ira, IrInstruction *source_instruction) { | 5855 | static bool ir_emit_global_runtime_side_effect(IrAnalyze *ira, IrInstruction *source_instruction) { |
| ... | @@ -7741,7 +7741,11 @@ static int ir_eval_bignum(ConstExprValue *op1_val, ConstExprValue *op2_val, | ... | @@ -7741,7 +7741,11 @@ static int ir_eval_bignum(ConstExprValue *op1_val, ConstExprValue *op2_val, |
| 7741 | | 7741 | |
| 7742 | bool overflow = bignum_fn(&out_val->data.x_bignum, &op1_val->data.x_bignum, &op2_val->data.x_bignum); | 7742 | bool overflow = bignum_fn(&out_val->data.x_bignum, &op1_val->data.x_bignum, &op2_val->data.x_bignum); |
| 7743 | if (overflow) { | 7743 | if (overflow) { |
| 7744 | return ErrorOverflow; | 7744 | if (wrapping_op) { |
| | 7745 | zig_panic("TODO compiler bug, implement compile-time wrapping arithmetic for >= 64 bit ints"); |
| | 7746 | } else { |
| | 7747 | return ErrorOverflow; |
| | 7748 | } |
| 7745 | } | 7749 | } |
| 7746 | | 7750 | |
| 7747 | if (type->id == TypeTableEntryIdInt && !bignum_fits_in_bits(&out_val->data.x_bignum, | 7751 | if (type->id == TypeTableEntryIdInt && !bignum_fits_in_bits(&out_val->data.x_bignum, |
| ... | @@ -12985,6 +12989,9 @@ TypeTableEntry *ir_analyze(CodeGen *codegen, IrExecutable *old_exec, IrExecutabl | ... | @@ -12985,6 +12989,9 @@ TypeTableEntry *ir_analyze(CodeGen *codegen, IrExecutable *old_exec, IrExecutabl |
| 12985 | } | 12989 | } |
| 12986 | | 12990 | |
| 12987 | TypeTableEntry *return_type = ir_analyze_instruction(ira, old_instruction); | 12991 | TypeTableEntry *return_type = ir_analyze_instruction(ira, old_instruction); |
| | 12992 | if (type_is_invalid(return_type) && ir_should_inline(new_exec, old_instruction->scope)) { |
| | 12993 | break; |
| | 12994 | } |
| 12988 | | 12995 | |
| 12989 | // unreachable instructions do their own control flow. | 12996 | // unreachable instructions do their own control flow. |
| 12990 | if (return_type->id == TypeTableEntryIdUnreachable) | 12997 | if (return_type->id == TypeTableEntryIdUnreachable) |