mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
Add regression test for too many foreach loop indices
Check that an error is reported if too many indices are specified in a foreach loop. Signed-off-by: Lars-Peter Clausen <[email protected]>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Check that an error is reported if the number of loop indices exceeds the
|
||||
// number of array dimensions in a foreach loop.
|
||||
|
||||
module test;
|
||||
|
||||
logic a[10];
|
||||
|
||||
initial begin
|
||||
foreach(a[i,j]) begin
|
||||
$display("FAILED");
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
@@ -600,6 +600,7 @@ sv_foreach2 normal,-g2009 ivltests
|
||||
sv_foreach3 normal,-g2009 ivltests
|
||||
sv_foreach4 normal,-g2009 ivltests
|
||||
sv_foreach5 normal,-g2009 ivltests
|
||||
sv_foreach_fail1 CE,-g2009 ivltests
|
||||
sv_immediate_assert normal,-g2009 ivltests gold=sv_immediate_assert.gold
|
||||
sv_immediate_assume normal,-g2009 ivltests gold=sv_immediate_assume.gold
|
||||
sv_macro normal,-g2009 ivltests
|
||||
|
||||
Reference in New Issue
Block a user