Fix dynamic array elements passed to ref argument (#6877)

This commit is contained in:
Ryszard Rozak
2026-01-01 10:21:09 -05:00
committed by GitHub
parent c388e793e0
commit cc11ff8c53
2 changed files with 51 additions and 38 deletions
+5 -2
View File
@@ -534,8 +534,11 @@ class TaskVisitor final : public VNVisitor {
refArgOk = cMethodp->method() == VCMethod::DYN_AT_WRITE_APPEND
|| cMethodp->method() == VCMethod::DYN_AT_WRITE_APPEND_BACK;
} else {
refArgOk = cMethodp->method() == VCMethod::ARRAY_AT
|| cMethodp->method() == VCMethod::ARRAY_AT_BACK;
if (cMethodp->method() == VCMethod::ARRAY_AT) {
// Change the method to writable variant
cMethodp->method(VCMethod::ARRAY_AT_WRITE);
}
refArgOk = cMethodp->method() == VCMethod::ARRAY_AT_WRITE;
}
}
if (refArgOk) {