Fix shift corner-case, bug 774.

This commit is contained in:
Wilson Snyder
2014-06-10 19:13:55 -04:00
parent 475e4207cc
commit e77b7427b4
3 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -448,8 +448,8 @@ private:
AstNode* newp = new AstShiftR (nodep->fileline(),
fromp,
dropCondBound(lsbp),
nodep->width());
newp->dtypeFrom(nodep);
fromp->width()); // {large}>>32 requires 64-bit shift operation; then cast
newp->dtypeFrom(fromp);
if (!nodep->isQuad() && fromp->isQuad()) {
newp = new AstCCast (newp->fileline(), newp, nodep);
}