forked from github/verilator
Fix bounded queues with parameter bounds
This commit is contained in:
parent
ea4cc4e076
commit
0fc5d37901
@ -1682,6 +1682,7 @@ private:
|
||||
// Iterate into subDTypep() to resolve that type and update pointer.
|
||||
nodep->refDTypep(iterateEditMoveDTypep(nodep, nodep->subDTypep()));
|
||||
nodep->dtypep(nodep); // The array itself, not subDtype
|
||||
userIterateAndNext(nodep->boundp(), WidthVP{SELF, BOTH}.p());
|
||||
if (VN_IS(nodep->boundp(), Unbounded)) {
|
||||
nodep->boundp()->unlinkFrBack()->deleteTree(); // nullptr will represent unbounded
|
||||
}
|
||||
|
@ -6,7 +6,9 @@
|
||||
|
||||
module t (/*AUTOARG*/);
|
||||
|
||||
int q[$ : 2]; // Shall not go higher than [2], i.e. size 3
|
||||
localparam TWO = 2;
|
||||
|
||||
int q[$ : TWO]; // Shall not go higher than [2], i.e. size 3
|
||||
|
||||
initial begin
|
||||
q.push_front(3);
|
||||
|
Loading…
Reference in New Issue
Block a user