diff --git a/gen/toir.cpp b/gen/toir.cpp index 98b423b6..c5439443 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -989,6 +989,7 @@ LLConstant* AddrExp::toConstElem(IRState* p) VarDeclaration* vd = vexp->var->isVarDeclaration(); assert(vd); assert(vd->type->toBasetype()->ty == Tsarray); + vd->codegen(Type::sir); assert(vd->ir.irGlobal); // get index