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 <noreply@anthropic.com>
This commit is contained in:
Andrew Pullin 2026-01-24 20:40:11 -08:00
parent b546b4e686
commit 87dfed3cdd
2 changed files with 21 additions and 0 deletions

View File

@ -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

View File

@ -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