Throw unsupported when reduction constraining dynamic subarray (#8111)

Signed-off-by: Kornel Uriasz <[email protected]>
This commit is contained in:
Kornel Uriasz
2026-08-14 07:56:31 -04:00
committed by GitHub
parent abf199cf0e
commit 2957939d4b
4 changed files with 101 additions and 0 deletions
+6
View File
@@ -2740,6 +2740,12 @@ class ConstraintExprVisitor final : public VNVisitor {
nodep->v3fatalSrc("Method not handled in constraints? " << nodep);
return;
}
if (!VN_IS(nodep->fromp(), VarRef)) {
// Non-dynamic subarrays and member arrays are handled in other parts of code
nodep->v3warn(CONSTRAINTIGN, "Unsupported: Array reduction constraint on dynamic "
"array inside array or struct");
return;
}
// Create loop variable and header
AstVar* const loopVarp