Fix 'void(' mis-throwing assertion
This commit is contained in:
parent
27558c9349
commit
dc00bf2484
|
|
@ -3583,8 +3583,8 @@ statement_item<nodeStmtp>: // IEEE: statement_item
|
||||||
newfl->warnOff(V3ErrorCode::IGNOREDRETURN, true);
|
newfl->warnOff(V3ErrorCode::IGNOREDRETURN, true);
|
||||||
$6->fileline(newfl);
|
$6->fileline(newfl);
|
||||||
$$ = exprp->makeStmt(); }
|
$$ = exprp->makeStmt(); }
|
||||||
| yVOID yP_TICK '(' system_t_stmt_call ')' ';'
|
| yVOID yP_TICK '(' system_f_only_expr_call ')' ';'
|
||||||
{ $$ = $4;
|
{ $$ = new AstStmtExpr{$<fl>4, $4};
|
||||||
FileLine* const newfl = new FileLine{$$->fileline()};
|
FileLine* const newfl = new FileLine{$$->fileline()};
|
||||||
newfl->warnOff(V3ErrorCode::IGNOREDRETURN, true);
|
newfl->warnOff(V3ErrorCode::IGNOREDRETURN, true);
|
||||||
$$->fileline(newfl); }
|
$$->fileline(newfl); }
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ module t;
|
||||||
i = $cast(bao, b);
|
i = $cast(bao, b);
|
||||||
if (i != 0) $stop;
|
if (i != 0) $stop;
|
||||||
if (bao != ba) $stop; // Unchanged
|
if (bao != ba) $stop; // Unchanged
|
||||||
|
void'($cast(bao, b)); // Ok as is function
|
||||||
|
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
[0] %Error: t_castdyn_run_bad.v:35: Assertion failed in top.t: '$cast' failed.
|
[0] %Error: t_castdyn_run_bad.v:36: Assertion failed in top.t: '$cast' failed.
|
||||||
%Error: t/t_castdyn_run_bad.v:35: Verilog $stop
|
%Error: t/t_castdyn_run_bad.v:36: Verilog $stop
|
||||||
Aborting...
|
Aborting...
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ module t;
|
||||||
b = bb;
|
b = bb;
|
||||||
i = $cast(ba1, b);
|
i = $cast(ba1, b);
|
||||||
if (i != 0) $stop;
|
if (i != 0) $stop;
|
||||||
|
void'($cast(ba1, b)); // ok as is function
|
||||||
$cast(ba1, b); // <-- Bad $cast task
|
$cast(ba1, b); // <-- Bad $cast task
|
||||||
|
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue