Check signedness

This commit is contained in:
Todd Strader 2020-03-27 13:22:16 -04:00
parent dc517c8335
commit 089fe9ae0f

View File

@ -3591,7 +3591,9 @@ private:
AstNodeDType* typeLhsp = refLhsp->refDTypep();
AstNodeDType* typeRhsp = refRhsp->refDTypep();
if (AstBasicDType* basicLhsp = VN_CAST(typeLhsp, BasicDType)) {
if (VN_IS(typeRhsp, BasicDType) && basicLhsp->same(typeRhsp)) {
AstBasicDType* basicRhsp = VN_CAST(typeRhsp, BasicDType);
if (basicRhsp && basicLhsp->same(typeRhsp)
&& basicLhsp->isSigned() == basicRhsp->isSigned()) {
equal = true;
}
} else if (refLhsp->dtypep() == refRhsp->dtypep()) {