mirror of
https://github.com/verilator/verilator.git
synced 2025-05-03 22:16:53 +00:00
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.
|
// Iterate into subDTypep() to resolve that type and update pointer.
|
||||||
nodep->refDTypep(iterateEditMoveDTypep(nodep, nodep->subDTypep()));
|
nodep->refDTypep(iterateEditMoveDTypep(nodep, nodep->subDTypep()));
|
||||||
nodep->dtypep(nodep); // The array itself, not subDtype
|
nodep->dtypep(nodep); // The array itself, not subDtype
|
||||||
|
userIterateAndNext(nodep->boundp(), WidthVP{SELF, BOTH}.p());
|
||||||
if (VN_IS(nodep->boundp(), Unbounded)) {
|
if (VN_IS(nodep->boundp(), Unbounded)) {
|
||||||
nodep->boundp()->unlinkFrBack()->deleteTree(); // nullptr will represent unbounded
|
nodep->boundp()->unlinkFrBack()->deleteTree(); // nullptr will represent unbounded
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
|
|
||||||
module t (/*AUTOARG*/);
|
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
|
initial begin
|
||||||
q.push_front(3);
|
q.push_front(3);
|
||||||
|
Loading…
Reference in New Issue
Block a user