Skip to content

Commit

Permalink
Make 'disable isn't underneath a begin' into UNSUPPORTED error (veril…
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnyder committed Apr 28, 2024
1 parent 27b7e70 commit 8ed269c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/V3LinkJump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ class LinkJumpVisitor final : public VNVisitor {
}
// if (debug() >= 9) { UINFO(0, "\n"); blockp->dumpTree("- labeli: "); }
if (!blockp) {
nodep->v3error("disable isn't underneath a begin with name: " << nodep->prettyNameQ());
nodep->v3warn(E_UNSUPPORTED,
"disable isn't underneath a begin with name: " << nodep->prettyNameQ());
} else if (AstBegin* const beginp = VN_CAST(blockp, Begin)) {
// Jump to the end of the named block
AstJumpLabel* const labelp = findAddLabel(beginp, false);
Expand Down
3 changes: 2 additions & 1 deletion test_regress/t/t_func_return_bad.out
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
%Error: t/t_func_return_bad.v:19:7: break isn't underneath a loop
19 | break;
| ^~~~~
%Error: t/t_func_return_bad.v:22:7: disable isn't underneath a begin with name: 'foo'
%Error-UNSUPPORTED: t/t_func_return_bad.v:22:7: disable isn't underneath a begin with name: 'foo'
22 | disable foo;
| ^~~~~~~
... For error description see https://verilator.org/warn/UNSUPPORTED?v=latest
%Error: Exiting due to

0 comments on commit 8ed269c

Please sign in to comment.