Add warning about setting lifetime to static
Signed-off-by: Kamil Danecki <kdanecki@internships.antmicro.com>
This commit is contained in:
parent
1e581ba5fa
commit
e36564ff73
|
|
@ -389,6 +389,7 @@ class LinkParseVisitor final : public VNVisitor {
|
|||
// Variables in static tasks with timing control can be used after the task has ended
|
||||
// with use of join..fork_none, so they need to be static
|
||||
if (m_ftaskp->lifetime().isStatic() && m_hasTimingControl) {
|
||||
nodep->v3warn(IMPLICITSTATIC, "Variable's lifetime implicitly set to static because in static task with timing control.");
|
||||
nodep->lifetime(VLifetime::STATIC_IMPLICIT);
|
||||
} else {
|
||||
nodep->lifetime(VLifetime::AUTOMATIC_IMPLICIT);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import vltest_bootstrap
|
|||
|
||||
test.scenarios('simulator')
|
||||
|
||||
test.compile(verilator_flags2=["--binary"])
|
||||
test.compile(verilator_flags2=["--binary", "-Wno-implicitstatic"])
|
||||
|
||||
test.execute()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue