verilator/test_regress/t/t_static_dup_name.v
Stefan Wallentowitz 7708c88e32
Fix duplicate static names in blocks in functions (#4144) (#4160)
Static variables of functions are created in the function. When blocks
in a function use identical names for static variables, we need to name
those variables properly.
2023-05-02 20:24:44 -04:00

35 lines
658 B
Systemverilog

// DESCRIPTION: Verilator: Verilog Test module
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2020 by Wilson Snyder.
// SPDX-License-Identifier: CC0-1.0
module t;
function do_stuff();
static int some_int;
begin: block0
static int some_int;
end
begin: block1
static int some_int;
end
begin
static int some_int;
end
begin: block2
begin: block3
static int some_int;
end
begin
static int some_int;
end
end
endfunction
initial begin
$write("*-* All Finished *-*\n");
$finish();
end
endmodule