aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1163/bug3.vhdl
blob: 071972d370d8ef3592a7c216cd6c89c5380f818d (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
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;

entity bug is
    port(index : in integer range 0 to 1);
end bug;

architecture behav of bug is

    type foobar is record
        foo : std_logic;
        bar : std_logic_vector(1 downto 0);
    end record;

    -- Changing the order works:
    --type foobar is record
    --    bar : std_logic_vector(1 downto 0);
    --    foo : std_logic;
    --end record;

    type foobar_array is array (0 to 1) of foobar;

    signal s_foobar : foobar_array;
begin
    s_foobar(index).bar(0) <= '0';
end architecture;