From e485af94d404792f7f695fcbc7ee8f9fb986291b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 7 May 2017 18:09:45 -0400 Subject: fix inability to initialize global pointer to global array element closes #366 --- src/ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 53f2a48d74..e91a1aad49 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -9753,7 +9753,7 @@ static TypeTableEntry *ir_analyze_instruction_elem_ptr(IrAnalyze *ira, IrInstruc ConstExprValue *array_ptr_val; if (array_ptr->value.special != ConstValSpecialRuntime && - array_ptr->value.data.x_ptr.mut != ConstPtrMutRuntimeVar && + (array_ptr->value.data.x_ptr.mut != ConstPtrMutRuntimeVar || array_type->id == TypeTableEntryIdArray) && (array_ptr_val = const_ptr_pointee(ira->codegen, &array_ptr->value)) && array_ptr_val->special != ConstValSpecialRuntime && (array_type->id != TypeTableEntryIdPointer || -- cgit v1.2.3