Browse Source

Fix indexing code gen for multi-pointers

gingerBill 4 years ago
parent
commit
db6fad7396
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/llvm_backend_expr.cpp

+ 1 - 1
src/llvm_backend_expr.cpp

@@ -2870,7 +2870,7 @@ lbAddr lb_build_addr(lbProcedure *p, Ast *expr) {
 
 			LLVMValueRef indices[1] = {index.value};
 			v.value = LLVMBuildGEP(p->builder, multi_ptr.value, indices, 1, "");
-			v.type = t;
+			v.type = alloc_type_pointer(t->MultiPointer.elem);
 			return lb_addr(v);
 		}