Avoid crash with typo in varaible name

A simple typo in the rhs of an expression would crash the compiler.
Example:

module crash3;
reg clk;
integer cnt1=0;
always @(posedge clk) begin
        cnt1 <= (cnt==81) ? 0 : (cnt1+1);
end
endmodule
This commit is contained in:
Larry Doolittle 2008-11-14 15:43:49 -08:00 committed by Stephen Williams
parent 574c8a870d
commit 1d41037009
1 changed files with 1 additions and 0 deletions

View File

@ -2037,6 +2037,7 @@ NetProc* PAssignNB::elaborate(Design*des, NetScope*scope) const
if (lv == 0) return 0;
NetExpr*rv = elaborate_rval_(des, scope, count_lval_width(lv), lv->expr_type());
if (rv == 0) return 0;
/* Handle the (common) case that the r-value is a vector. This
includes just about everything but reals. In this case, we