| ... | ... | @@ -8538,11 +8538,13 @@ static TypeTableEntry *ir_analyze_dereference(IrAnalyze *ira, IrInstructionUnOp |
| 8538 | 8538 | // this dereference is always an rvalue because in the IR gen we identify lvalue and emit |
| 8539 | 8539 | // one of the ptr instructions |
| 8540 | 8540 | |
| 8541 | | if (value->value.special != ConstValSpecialRuntime) { |
| 8542 | | ConstExprValue *out_val = ir_build_const_from(ira, &un_op_instruction->base); |
| 8541 | if (instr_is_comptime(value)) { |
| 8543 | 8542 | ConstExprValue *pointee = const_ptr_pointee(&value->value); |
| 8544 | | *out_val = *pointee; |
| 8545 | | return child_type; |
| 8543 | if (pointee->type == child_type) { |
| 8544 | ConstExprValue *out_val = ir_build_const_from(ira, &un_op_instruction->base); |
| 8545 | *out_val = *pointee; |
| 8546 | return child_type; |
| 8547 | } |
| 8546 | 8548 | } |
| 8547 | 8549 | |
| 8548 | 8550 | ir_build_load_ptr_from(&ira->new_irb, &un_op_instruction->base, value); |