diff -uNr dmd-0.158/dmd/src/dmd/attrib.c dmd-0.159/dmd/src/dmd/attrib.c --- dmd-0.158/dmd/src/dmd/attrib.c 2006-05-24 20:05:14.000000000 +0200 +++ dmd-0.159/dmd/src/dmd/attrib.c 2006-05-26 00:40:48.000000000 +0200 @@ -540,6 +540,7 @@ this->loc = loc; this->isunion = isunion; this->scope = NULL; + this->sem = 0; } Dsymbol *AnonDeclaration::syntaxCopy(Dsymbol *s) @@ -615,7 +616,10 @@ scope->module->addDeferredSemantic(this); return; } - Module::dprogress++; + if (sem == 0) + { Module::dprogress++; + sem = 1; + } // 0 sized structs are set to 1 byte if (aad.structsize == 0) diff -uNr dmd-0.158/dmd/src/dmd/attrib.h dmd-0.159/dmd/src/dmd/attrib.h --- dmd-0.158/dmd/src/dmd/attrib.h 2006-05-13 00:02:06.000000000 +0200 +++ dmd-0.159/dmd/src/dmd/attrib.h 2006-05-26 00:40:58.000000000 +0200 @@ -98,6 +98,7 @@ { int isunion; Scope *scope; // !=NULL means context to use + int sem; // 1 if successful semantic() AnonDeclaration(Loc loc, int isunion, Array *decl); Dsymbol *syntaxCopy(Dsymbol *s); diff -uNr dmd-0.158/dmd/src/dmd/mars.c dmd-0.159/dmd/src/dmd/mars.c --- dmd-0.158/dmd/src/dmd/mars.c 2006-05-12 10:55:34.000000000 +0200 +++ dmd-0.159/dmd/src/dmd/mars.c 2006-05-25 13:06:14.000000000 +0200 @@ -58,7 +58,7 @@ copyright = "Copyright (c) 1999-2006 by Digital Mars"; written = "written by Walter Bright"; - version = "v0.158"; + version = "v0.159"; global.structalign = 8; memset(¶ms, 0, sizeof(Param)); diff -uNr dmd-0.158/dmd/src/dmd/module.c dmd-0.159/dmd/src/dmd/module.c --- dmd-0.158/dmd/src/dmd/module.c 2006-05-11 01:48:30.000000000 +0200 +++ dmd-0.159/dmd/src/dmd/module.c 2006-05-26 00:41:42.000000000 +0200 @@ -844,6 +844,7 @@ s->semantic(NULL); } + //printf("\tdeferred.dim = %d, len = %d, dprogress = %d\n", deferred.dim, len, dprogress); } while (deferred.dim < len || dprogress); // while making progress nested--; //printf("-Module::runDeferredSemantic('%s'), len = %d\n", toChars(), deferred.dim); diff -uNr dmd-0.158/dmd/src/dmd/struct.c dmd-0.159/dmd/src/dmd/struct.c --- dmd-0.158/dmd/src/dmd/struct.c 2006-05-13 00:07:24.000000000 +0200 +++ dmd-0.159/dmd/src/dmd/struct.c 2006-05-26 00:42:22.000000000 +0200 @@ -219,6 +219,9 @@ Scope *sc2; //printf("+StructDeclaration::semantic(this=%p, '%s')\n", this, toChars()); + + //static int count; if (++count == 20) *(char*)0=0; + assert(type); if (!members) // if forward reference return; @@ -271,7 +274,9 @@ if (isUnionDeclaration()) sc2->offset = 0; if (sizeok == 2) + { //printf("forward reference\n"); break; + } } /* The TypeInfo_Struct is expecting an opEquals and opCmp with