aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1768/repro2.vhdl
blob: e2e9f15cc83fdb90617819f3e4d58088cdacf90a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package pkg2 is
  type natural_array is array (positive range <>) of natural;
  constant log2 : natural_array := (1 => 0,
                                    2 => 1,
                                    3 to 4 => 2,
                                    5 to 8 => 3);
end pkg2;

use work.pkg2.all;

package repro2 is
  constant W : natural := 8;
  function f (vec : bit_vector(log2(W / 2) - 1 downto 0)) return bit;
end repro2;

package body repro2 is
  function f (vec : bit_vector(log2(W / 2) - 1 downto 0)) return bit is
  begin
    return '1';
  end f;
end repro2;