Fixed AddrExp might silently change the type of its value, but we weren't casting to compensate ... why doesn't DMD insert a cast?

This commit is contained in:
Tomas Lindquist Olsen
2008-09-15 02:39:55 +02:00
parent 4280a86bcf
commit be651d97b7

View File

@@ -854,7 +854,7 @@ DValue* AddrExp::toElem(IRState* p)
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)