mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: resolved incorrect array bounds guarding (#8224)
Co-authored-by: Sumanth Kadiyala <[email protected]>
This commit is contained in:
co-authored by
Sumanth Kadiyala
parent
d04647f459
commit
3990376c57
+1
-1
@@ -146,7 +146,7 @@ class UnknownVisitor final : public VNVisitor {
|
||||
// Returns true if it is known at compile time that `msbConstp` is greater than or equal
|
||||
// `exprp`
|
||||
static bool isStaticlyGte(AstConst* const msbConstp, const AstNodeExpr* const exprp) {
|
||||
if (msbConstp->width() >= exprp->width()
|
||||
if (msbConstp->width() >= exprp->width() && exprp->width() < 32
|
||||
&& msbConstp->num().toSInt() >= (1 << exprp->width()) - 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user