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:
parent
b546b4e686
commit
87dfed3cdd
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue