changeset 1580:b4616536dc04

allow forward referencing, fix #361
author Moritz Warning <moritzwarning@web.de>
date Wed, 09 Sep 2009 20:13:17 +0200
parents 819b4f961711
children f4421c81398f
files gen/toir.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/toir.cpp	Wed Sep 09 02:03:24 2009 +0200
+++ b/gen/toir.cpp	Wed Sep 09 20:13:17 2009 +0200
@@ -989,6 +989,7 @@
         VarDeclaration* vd = vexp->var->isVarDeclaration();
         assert(vd);
         assert(vd->type->toBasetype()->ty == Tsarray);
+        vd->codegen(Type::sir);
         assert(vd->ir.irGlobal);
 
         // get index