Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.

Updated the runtest script to build libtangobos-partial.a if it hasn't already been built.
Added in signbit() and va_arg!()() to libtangobos-partial.a so more of the phobos dependent DStress tests pass.
This commit is contained in:
Robert Clipsham
2009-11-08 16:16:17 +00:00
parent 3c1219669b
commit 98e869c7ec
5 changed files with 177 additions and 3 deletions

View File

@@ -266,8 +266,16 @@ LLConstant* VarExp::toConstElem(IRState* p)
VarDeclaration* vd = var->isVarDeclaration();
if (vd && vd->isConst() && vd->init)
{
if (vd->inuse)
{
error("recursive reference %s", toChars());
return llvm::UndefValue::get(DtoType(type));
}
vd->inuse++;
LLConstant* ret = DtoConstInitializer(loc, type, vd->init);
vd->inuse--;
// return the initializer
return DtoConstInitializer(loc, type, vd->init);
return ret;
}
// fail