aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue301/repro.vhdl
blob: 04369e1978a1fc02391d4467b1534b6489efa02f (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
32
33
34
35
36
37
38
39
40
package pkgc is
  constant width : natural;
end pkgc;

package body pkgc is
  constant width : natural := 4;
end pkgc;

use work.pkgc.all;
package pkgcomp is
  component comp is
    generic (val : bit_vector (width -1 downto 0));
    port (b : out bit);
  end component;
end pkgcomp;

use work.pkgc.all;
entity comp is
  generic (val : bit_vector (width -1 downto 0));
  port (b : out bit);
end comp;

architecture behav of comp is
begin
  b <= val (val'left);
end behav;

entity repro is
end repro;

use work.pkgc.all;
use work.pkgcomp.all;

architecture behav of repro is
  signal res : bit;
begin
  inst : comp
    generic map (val => "0010")
    port map (b => res );
end behav;