aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1267/issue.vhdl
blob: a5eb70be1ceec798b40bef2a9093aa8be9dd79da (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
library ieee;
use ieee.std_logic_1164.all;

entity issue is
    port (bar    : in  std_logic;
          foobar : out std_logic);
end issue;

architecture beh of issue is
    function foo (arg : std_logic) return std_logic is
    begin
        RET_PATH1:
        if arg = '1' then
            return '1';
        end if;

        -- null range intended, but not necessary to repro
        for i in 2 to 1 loop
            EXIT_LOOP:
            exit when true;
        end loop;

        RET_PATH2:
        return '0';
    end function;
begin
    foobar <= foo (bar);
end architecture;