Fix ENDLABEL warnings on escaped identifiers.

This commit is contained in:
Wilson Snyder 2014-05-15 20:52:22 -04:00
parent f62bc6a2e5
commit 5f262a8f11
3 changed files with 6 additions and 3 deletions

View File

@ -9,6 +9,8 @@ indicates the contributor was also the author of the fix; Thanks!
**** Fix huge shifts to zero with -Wno-WIDTH, bug765. [Clifford Wolf]
**** Fix ENDLABEL warnings on escaped identifiers.
* Verilator 3.860 2014-05-11

View File

@ -100,7 +100,8 @@ public:
}
void endLabel(FileLine* fl, AstNode* nodep, string* endnamep) { endLabel(fl, nodep->prettyName(), endnamep); }
void endLabel(FileLine* fl, string name, string* endnamep) {
if (fl && endnamep && *endnamep != "" && name != *endnamep) {
if (fl && endnamep && *endnamep != "" && name != *endnamep
&& name != AstNode::prettyName(*endnamep)) {
fl->v3warn(ENDLABEL,"End label '"<<*endnamep<<"' does not match begin label '"<<name<<"'");
}
}

View File

@ -27,10 +27,10 @@ module t (/*AUTOARG*/
// finish report
always @ (posedge clk)
if (cnt==SIZE) begin : if_cnt_finish
if (cnt==SIZE) begin : \0escaped___name
$write("*-* All Finished *-*\n");
$finish;
end : if_cnt_finish
end : \0escaped___name
generate
for (i=0; i<SIZE; i=i+1) begin : generate_for