git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@756
4a8a32a2-be11-0410-ad9d-
d568d2c75423
if (IS_PTR (ltype))
{
isarray = left->isaddr;
- size = operandFromLit (getSize (ltype->next));
- right = geniCodeMultiply (right, size, (getArraySizePtr(left) >= INTSIZE));
+ // there is no need to multiply with 1
+ if (getSize(ltype->next)!=1) {
+ size = operandFromLit (getSize (ltype->next));
+ right = geniCodeMultiply (right, size, (getArraySizePtr(left) >= INTSIZE));
+ }
resType = copyLinkChain (ltype);
}
else