changeset 553:d19e29194c13

Do not assert on non-existing supposed globals. (see nocompile/union_12,14)
author Christian Kamm <kamm incasoftware de>
date Thu, 28 Aug 2008 20:15:36 +0200
parents 648409a7fb0c
children 1b702422451c
files gen/toir.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gen/toir.cpp	Thu Aug 28 08:37:47 2008 +0200
+++ b/gen/toir.cpp	Thu Aug 28 20:15:36 2008 +0200
@@ -130,7 +130,7 @@
                 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();