blob: fd8695ce11df97c2c61469911b73c89178259936 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
library IEEE;
use IEEE.std_logic_1164.all;
entity bug is
port (
clk : in std_ulogic
);
end bug;
architecture behav of bug is
type fields_t is record
field_a : std_ulogic_vector;
field_b : std_ulogic;
end record;
type field_array_t is array(natural range<>) of fields_t;
function fun return std_ulogic is
variable field_array : field_array_t(0 to 1)(field_a(0 to 31));
begin
if field_array(0).field_b = '1' then -- this causes the crash
--nothing
end if;
return '0';
end function;
constant data : std_ulogic := fun;
begin
end architecture;
|