aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1038/repro4.vhdl
blob: 0addf4c675012245058f470f915c175254b495fa (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
entity repro4 is
end;

architecture behav of repro4 is
    type bv_array      is array (natural range <>) of bit_vector;
    subtype byte_array  is bv_array(open)(7 downto 0);

    type mrec is record
      b                   : boolean;
      data                : byte_array;
    end record;

    signal s : mrec (data(0 to 3));

  function get_val return mrec is
    variable a : mrec (data(1 to 4));
  begin
    return a;
  end get_val;
begin
  process
  begin
    s <= get_val;
    wait;
  end process;
end behav;