aboutsummaryrefslogtreecommitdiffstats
path: root/tests/verilog/genblk_port_decl.ys
diff options
context:
space:
mode:
Diffstat (limited to 'tests/verilog/genblk_port_decl.ys')
-rw-r--r--tests/verilog/genblk_port_decl.ys12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/verilog/genblk_port_decl.ys b/tests/verilog/genblk_port_decl.ys
new file mode 100644
index 000000000..589d3d2e1
--- /dev/null
+++ b/tests/verilog/genblk_port_decl.ys
@@ -0,0 +1,12 @@
+logger -expect error "Cannot declare module port `\\x' within a generate block\." 1
+read_verilog <<EOT
+module top(x);
+ generate
+ if (1) begin : blk
+ output wire x;
+ assign x = 1;
+ end
+ endgenerate
+ output wire x;
+endmodule
+EOT