# HG changeset patch # User Tomas Lindquist Olsen # Date 1221439195 -7200 # Node ID 311f16f262974fc895c79ab67589147d24e92985 # Parent 4435f57956e7b58eadc97fdcfe958fb175a0f1ab Fixed AddrExp might silently change the type of its value, but we weren't casting to compensate ... why doesn't DMD insert a cast? diff -r 4435f57956e7 -r 311f16f26297 gen/toir.cpp --- a/gen/toir.cpp Mon Sep 15 02:04:26 2008 +0200 +++ b/gen/toir.cpp Mon Sep 15 02:39:55 2008 +0200 @@ -854,7 +854,7 @@ Logger::println("is nothing special"); LLValue* lval = v->getLVal(); Logger::cout() << "lval: " << *lval << '\n'; - return new DImValue(type, v->getLVal()); + return new DImValue(type, DtoBitCast(v->getLVal(), DtoType(type))); } LLConstant* AddrExp::toConstElem(IRState* p)