Fixed most regressions from last commit.

This commit is contained in:
Tomas Lindquist Olsen
2008-09-10 12:33:33 -07:00
parent 8e9b957bce
commit d474fa027a
4 changed files with 50 additions and 5 deletions

View File

@@ -119,9 +119,12 @@ DValue* DtoComplex(Loc& loc, Type* to, DValue* val)
if (t->isimaginary()) {
res = DtoAggrPair(complexTy, LLConstant::getNullValue(DtoType(baserety)), DtoCastFloat(loc, val, baseimty)->getRVal());
}
else if (t->isfloating() || t->isintegral()) {
else if (t->isfloating()) {
res = DtoAggrPair(complexTy, DtoCastFloat(loc, val, baserety)->getRVal(), LLConstant::getNullValue(DtoType(baseimty)));
}
else if (t->isintegral()) {
res = DtoAggrPair(complexTy, DtoCastInt(loc, val, baserety)->getRVal(), LLConstant::getNullValue(DtoType(baseimty)));
}
else {
assert(0);
}