From 87dfed3cdd6a8a0bcf19f07f3862479cef2d714b Mon Sep 17 00:00:00 2001 From: Andrew Pullin Date: Sat, 24 Jan 2026 20:40:11 -0800 Subject: [PATCH] Add regression test for #1224: Packed vs unpacked dimension confusion This bug was fixed by the #1265 fix. Single-element unpacked arrays of packed types (like byte [0:0]) now work correctly in continuous assignments. Co-Authored-By: Claude Opus 4.5 --- ivtest/ivltests/br_gh1224.v | 20 ++++++++++++++++++++ ivtest/regress-sv.list | 1 + 2 files changed, 21 insertions(+) create mode 100644 ivtest/ivltests/br_gh1224.v diff --git a/ivtest/ivltests/br_gh1224.v b/ivtest/ivltests/br_gh1224.v new file mode 100644 index 000000000..c5100a2b7 --- /dev/null +++ b/ivtest/ivltests/br_gh1224.v @@ -0,0 +1,20 @@ +// Test for GitHub issue #1224 +// Packed vs unpacked dimension confusion with byte array +module a(output byte b [0:0]); + assign b = '{8'd1}; // Should be interpreted as single byte value +endmodule + +module test; + wire byte out_b [0:0]; + + a dut(.b(out_b)); + + initial begin + #1; + if (out_b[0] !== 8'd1) begin + $display("FAILED: out_b[0] = %d, expected 1", out_b[0]); + $finish; + end + $display("PASSED"); + end +endmodule diff --git a/ivtest/regress-sv.list b/ivtest/regress-sv.list index cb13a7575..548e52f9b 100644 --- a/ivtest/regress-sv.list +++ b/ivtest/regress-sv.list @@ -236,6 +236,7 @@ br_gh1222 CE,-g2009 ivltests gold=br_gh1222.gold br_gh1223a normal,-g2009 ivltests br_gh1223b normal,-g2009 ivltests br_gh1223c normal,-g2009 ivltests +br_gh1224 normal,-g2012 ivltests br_gh1230 normal,-g2009 ivltests br_ml20171017 normal,-g2009 ivltests br_ml20180227 CE,-g2009 ivltests