summaryrefslogtreecommitdiff
path: root/testsuite/gna/bug7186/bug.vhdl
blob: 95875214252fc261c48a11eb88577d63b756499a (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.numeric_std.all;
use ieee.std_logic_1164.all;

-- A testbench has no ports.
entity system is
end system;

architecture behav of system is
  subtype entry is unsigned(7 downto 0);
  type invect is array (natural range <>) of entry;
  signal minimum : entry;
  signal vec : invect(0 to 20);
  function min(iv : invect) return entry is
  begin
    return iv(0);
  end;
begin
  process
  begin
    minimum <= min(invect); -- should be vec not invect
    wait;
  end process;
end behav;