aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorZachary Snow <zach@zachjs.com>2021-05-10 11:06:02 -0400
committerZachary Snow <zachary.j.snow@gmail.com>2021-05-10 14:37:32 -0400
commit445208086121ea343bdb80a9998637361c841bea (patch)
treefbd5fe2314350d702fe8b94fff0bd913b33958f1 /frontends
parent32a0ce9d6809d073abcbf19fe3eaf7a0cf936963 (diff)
downloadyosys-445208086121ea343bdb80a9998637361c841bea.tar.gz
yosys-445208086121ea343bdb80a9998637361c841bea.tar.bz2
yosys-445208086121ea343bdb80a9998637361c841bea.zip
sv: check validity of package end label
Diffstat (limited to 'frontends')
-rw-r--r--frontends/verilog/verilog_parser.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y
index e4b3258c2..dd25f412f 100644
--- a/frontends/verilog/verilog_parser.y
+++ b/frontends/verilog/verilog_parser.y
@@ -579,6 +579,8 @@ package:
append_attr(mod, $1);
} ';' package_body TOK_ENDPACKAGE opt_label {
ast_stack.pop_back();
+ if ($4 != NULL && $9 != NULL && *$4 != *$9)
+ frontend_verilog_yyerror("Package name (%s) and end label (%s) don't match.", $4->c_str()+1, $9->c_str()+1);
current_ast_mod = NULL;
exitTypeScope();
};