diff options
-rw-r--r-- | testsuite/synth/issue1267/issue.vhdl | 28 | ||||
-rwxr-xr-x | testsuite/synth/issue1267/testsuite.sh | 8 |
2 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/synth/issue1267/issue.vhdl b/testsuite/synth/issue1267/issue.vhdl new file mode 100644 index 000000000..a5eb70be1 --- /dev/null +++ b/testsuite/synth/issue1267/issue.vhdl @@ -0,0 +1,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; diff --git a/testsuite/synth/issue1267/testsuite.sh b/testsuite/synth/issue1267/testsuite.sh new file mode 100755 index 000000000..30f40648a --- /dev/null +++ b/testsuite/synth/issue1267/testsuite.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +. ../../testenv.sh + +synth_analyze issue +clean + +echo "Test successful" |