Fix invalid C++ on cast (#8113)

Signed-off-by: Pawel Klopotek <[email protected]>
This commit is contained in:
Pawel Klopotek
2026-08-19 08:29:29 +02:00
committed by GitHub
parent 06ee8b7261
commit 7628a540af
3 changed files with 60 additions and 0 deletions
+5
View File
@@ -534,6 +534,11 @@ class TaskVisitor final : public VNVisitor {
}
postRhsp->dtypeFrom(outPinp);
}
if (VN_IS(outPinp, IToRD) || VN_IS(outPinp, ISToRD)) {
outPinp = VN_AS(outPinp, NodeUniop)->lhsp();
postRhsp = new AstRToIRoundS{pinp->fileline(), postRhsp};
postRhsp->dtypeFrom(outPinp);
}
// Put output assignment AFTER function call
AstNodeExpr* const outPinClonep
= pureCheck ? outPinp->cloneTreePure(true) : outPinp->cloneTree(true);