Fixed #35 — ICE: postfix operation on typedef'd value

This commit is contained in:
Alexey Prokhin 2011-12-05 13:09:10 +04:00
parent 4b22221eb9
commit 2980f703b1

View file

@ -1764,7 +1764,7 @@ DValue* PostExp::toElem(IRState* p)
}
else if (e1type->ty == Tpointer)
{
assert(e2type->isintegral());
assert(e2->op == TOKint64);
LLConstant* minusone = LLConstantInt::get(DtoSize_t(),(uint64_t)-1,true);
LLConstant* plusone = LLConstantInt::get(DtoSize_t(),(uint64_t)1,false);
LLConstant* whichone = (op == TOKplusplus) ? plusone : minusone;