Add regression tests for circular type definitions
Check that circular type definitions are detected and an error is reported. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
3787eca248
commit
10e35d1573
|
|
@ -0,0 +1,14 @@
|
|||
// Check that circular type definitions are detected and an error is reported.
|
||||
|
||||
module test;
|
||||
typedef T1;
|
||||
typedef T1 T2;
|
||||
typedef T2 T1;
|
||||
|
||||
T2 x;
|
||||
|
||||
initial begin
|
||||
$display("FAILED");
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
// Check that longer chains of circular type definitions are detected as an
|
||||
// error.
|
||||
|
||||
module test;
|
||||
|
||||
typedef T1;
|
||||
|
||||
typedef struct packed {
|
||||
T1 x;
|
||||
} T2;
|
||||
|
||||
typedef T2 [1:0] T3;
|
||||
|
||||
typedef T3 T1;
|
||||
|
||||
T1 x;
|
||||
|
||||
endmodule
|
||||
|
|
@ -716,6 +716,8 @@ sv_typedef_array_base2 normal,-g2009 ivltests
|
|||
sv_typedef_array_base3 normal,-g2009 ivltests
|
||||
sv_typedef_array_base4 normal,-g2009 ivltests
|
||||
sv_typedef_chained normal,-g2009 ivltests
|
||||
sv_typedef_circular1 CE,-g2009 ivltests
|
||||
sv_typedef_circular2 CE,-g2009 ivltests
|
||||
sv_typedef_darray_base1 normal,-g2009 ivltests
|
||||
sv_typedef_darray_base2 normal,-g2009 ivltests
|
||||
sv_typedef_darray_base3 normal,-g2009 ivltests
|
||||
|
|
|
|||
Loading…
Reference in New Issue