allow forward referencing, fix #361

This commit is contained in:
Moritz Warning
2009-09-09 20:13:17 +02:00
parent 4d507f0179
commit b7c0c9e25e

View File

@@ -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