aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1133/foo.vhdl
blob: 95dcddf55657d95c7dc45002d20bfdf5aa411c11 (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
library ieee;
use ieee.std_logic_1164.all;

entity foo is
  port (
    inp        : in std_logic_vector(7 downto 0);
    output_ok    : out std_logic_vector(7 downto 0);
    output_error : out std_logic_vector(7 downto 0)
  );
end foo;

architecture foo of foo is

  signal null_vector : std_logic_vector(-1 downto 0) := (others => '0');

begin

  -- This works fine
  null_vector  <= inp(null_vector'range);
  output_ok    <= null_vector & (7 downto 0 => '0');
  -- This doesn't
  output_error <= inp(-1 downto 0) & (7 downto 0 => '0');

end foo;