Add regression test for default member values in packed structs

Default member values are not allowed in packed structs. Check that an
error is reported for them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-12-27 08:45:48 -08:00
parent 6713b343cc
commit e83c0211b2
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
// Check that an error is reported when specifing a default member value for a
// packed struct.
module test;
struct packed {
// This should fail, default member value is not allowed for packed struct
integer x = 10;
} s;
initial begin
$display("FAILED");
end
endmodule

View File

@ -485,6 +485,7 @@ struct_member_signed normal,-g2009 ivltests
struct_packed_array normal,-g2009 ivltests
struct_packed_array2 normal,-g2009 ivltests
struct_packed_darray_fail CE,-g2009 ivltests
struct_packed_member_def CE,-g2009 ivltests
struct_packed_queue_fail CE,-g2009 ivltests
struct_packed_sysfunct normal,-g2009 ivltests
struct_packed_sysfunct2 normal,-g2009 ivltests