| ... | ... | @@ -8819,7 +8819,8 @@ static TypeTableEntry *ir_analyze_instruction_elem_ptr(IrAnalyze *ira, IrInstruc |
| 8819 | 8819 | ConstExprValue *array_ptr_val; |
| 8820 | 8820 | if (array_ptr->value.special != ConstValSpecialRuntime && |
| 8821 | 8821 | (array_ptr_val = const_ptr_pointee(&array_ptr->value)) && |
| 8822 | | array_ptr_val->special != ConstValSpecialRuntime) |
| 8822 | array_ptr_val->special != ConstValSpecialRuntime && |
| 8823 | (array_type->id != TypeTableEntryIdPointer || array_ptr_val->data.x_ptr.special != ConstPtrSpecialRuntime)) |
| 8823 | 8824 | { |
| 8824 | 8825 | bool depends_on_compile_var = array_ptr_val->depends_on_compile_var || |
| 8825 | 8826 | casted_elem_index->value.depends_on_compile_var; |
| ... | ... | @@ -8926,14 +8927,17 @@ static TypeTableEntry *ir_analyze_container_field_ptr(IrAnalyze *ira, Buf *field |
| 8926 | 8927 | if (!ptr_val) |
| 8927 | 8928 | return ira->codegen->builtin_types.entry_invalid; |
| 8928 | 8929 | |
| 8929 | | ConstExprValue *struct_val = const_ptr_pointee(ptr_val); |
| 8930 | | if (value_is_comptime(struct_val)) { |
| 8931 | | ConstExprValue *field_val = &struct_val->data.x_struct.fields[field->src_index]; |
| 8932 | | if (value_is_comptime(field_val)) { |
| 8933 | | bool depends_on_compile_var = field_val->depends_on_compile_var || |
| 8934 | | struct_val->depends_on_compile_var || ptr_val->depends_on_compile_var; |
| 8935 | | return ir_analyze_const_ptr(ira, &field_ptr_instruction->base, field_val, |
| 8936 | | field_val->type, depends_on_compile_var, ConstPtrSpecialNone, is_const, is_volatile); |
| 8930 | if (ptr_val->data.x_ptr.special != ConstPtrSpecialRuntime) { |
| 8931 | ConstExprValue *struct_val = const_ptr_pointee(ptr_val); |
| 8932 | if (value_is_comptime(struct_val)) { |
| 8933 | ConstExprValue *field_val = &struct_val->data.x_struct.fields[field->src_index]; |
| 8934 | if (value_is_comptime(field_val)) { |
| 8935 | bool depends_on_compile_var = field_val->depends_on_compile_var || |
| 8936 | struct_val->depends_on_compile_var || ptr_val->depends_on_compile_var; |
| 8937 | return ir_analyze_const_ptr(ira, &field_ptr_instruction->base, field_val, |
| 8938 | field_val->type, depends_on_compile_var, ConstPtrSpecialNone, |
| 8939 | is_const, is_volatile); |
| 8940 | } |
| 8937 | 8941 | } |
| 8938 | 8942 | } |
| 8939 | 8943 | } |