Add regression test for bogus member l-values

Check that bogus member access on a procedural l-value is rejected with a
normal compile error instead of aborting during elaboration.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2026-06-21 14:29:32 -07:00
parent eaa7197602
commit 3c7250eb51
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,9 @@
// Check that bogus member access on procedural l-values reports an error.
module test;
logic r;
initial begin
r.bad = 1'b1;
end
endmodule

View File

@ -254,6 +254,7 @@ sv_array_cassign10 vvp_tests/sv_array_cassign10.json
sv_array_cassign_single vvp_tests/sv_array_cassign_single.json
sv_array_cassign_single_fail1 vvp_tests/sv_array_cassign_single_fail1.json
sv_automatic_2state vvp_tests/sv_automatic_2state.json
sv_bad_member_lval_proc_fail vvp_tests/sv_bad_member_lval_proc_fail.json
sv_byte_array_string1 vvp_tests/sv_byte_array_string1.json
sv_byte_array_string2 vvp_tests/sv_byte_array_string2.json
sv_byte_array_string3 vvp_tests/sv_byte_array_string3.json

View File

@ -0,0 +1,5 @@
{
"type" : "CE",
"source" : "sv_bad_member_lval_proc_fail.v",
"iverilog-args" : [ "-g2005-sv" ]
}