From 8ce5a07fc0a76b286d5f2aa5dcab4ccb566776af Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Tue, 3 Mar 2009 17:27:14 +0100 Subject: [PATCH] Fixed potential assertion failure in taking address of function as a constant expression. --- gen/toir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index 421128b3..8e559789 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -975,8 +975,8 @@ LLConstant* AddrExp::toConstElem(IRState* p) // static function else if (FuncDeclaration* fd = vexp->var->isFuncDeclaration()) { + DtoForceDeclareDsymbol(fd); IrFunction* irfunc = fd->ir.irFunc; - assert(irfunc); return irfunc->func; } // something else