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 <lars@metafoo.de>
This commit is contained in:
parent
eaea5e7939
commit
f8401095aa
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue