From b7c0c9e25e950a0ecb84182dd9928cf52ca304a5 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Wed, 9 Sep 2009 20:13:17 +0200 Subject: [PATCH] allow forward referencing, fix #361 --- gen/toir.cpp | 1 + 1 file changed, 1 insertion(+) 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