aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1768/repro.vhdl
blob: 2d2dda3746ec1b7023d9b2544859cc013167ba72 (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
package pkg is
  function log2 (v : positive) return natural;
end pkg;

package body pkg is
  function log2 (v : positive) return natural is
  begin
    return 2;
  end log2;
end pkg;

use work.pkg.all;

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

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