Fix AstStructSel clean when data type is structure (#4241) (#4244)

This commit is contained in:
Risto Pejašinović
2023-05-30 23:44:48 -04:00
committed by GitHub
parent 4f1f487ae4
commit 338acabe2b
2 changed files with 7 additions and 3 deletions
+5
View File
@@ -234,6 +234,11 @@ private:
operandTriop(nodep);
setClean(nodep, nodep->cleanOut());
}
void visit(AstStructSel* nodep) override {
iterateChildren(nodep);
AstStructDType* dtypep = VN_CAST(nodep->dtypep()->skipRefp(), StructDType);
setClean(nodep, dtypep && !dtypep->packed());
}
void visit(AstUCFunc* nodep) override {
iterateChildren(nodep);
computeCppWidth(nodep);