diff options
author | Zachary Snow <zach@zachjs.com> | 2021-05-10 11:06:02 -0400 |
---|---|---|
committer | Zachary Snow <zachary.j.snow@gmail.com> | 2021-05-10 14:37:32 -0400 |
commit | 445208086121ea343bdb80a9998637361c841bea (patch) | |
tree | fbd5fe2314350d702fe8b94fff0bd913b33958f1 /frontends | |
parent | 32a0ce9d6809d073abcbf19fe3eaf7a0cf936963 (diff) | |
download | yosys-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.y | 2 |
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(); }; |