From 0f92afc5b94c1b5b67be6db5f176923bd81fd358 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 28 Aug 2008 20:15:36 +0200 Subject: [PATCH] Do not assert on non-existing supposed globals. (see nocompile/union_12,14) --- gen/toir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index 17be3f83..6edabf40 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -130,7 +130,7 @@ DValue* VarExp::toElem(IRState* p) vd->toObjFile(0); // TODO: multiobj DtoConstInitGlobal(vd); } - if (!vd->ir.getIrValue() || DtoType(vd->type)->isAbstract()) { + if (!vd->ir.isSet() || !vd->ir.getIrValue() || DtoType(vd->type)->isAbstract()) { error("global variable %s not resolved", vd->toChars()); Logger::cout() << "unresolved global had type: " << *DtoType(vd->type) << '\n'; fatal();