blob: af3c550faaedcc5a842d79bb80099552dc1f2206 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
entity repro is
end;
architecture behav of repro is
type id_arr is array(bit) of bit;
constant idc : id_arr := ('0' => '0', '1' => '1');
function f(a : bit_vector) return bit_vector
is
variable v : bit_vector(1 to a'length) := a;
variable r : bit_vector(1 to a'length);
begin
for i in v'range loop
r(i) := idc(v (i));
end loop;
return r;
end f;
begin
assert f("01") = "01";
end behav;
|