diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/synth/issue1242/issue.vhdl | 22 | ||||
-rwxr-xr-x | testsuite/synth/issue1242/testsuite.sh | 7 |
2 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/synth/issue1242/issue.vhdl b/testsuite/synth/issue1242/issue.vhdl new file mode 100644 index 000000000..afc5d3eae --- /dev/null +++ b/testsuite/synth/issue1242/issue.vhdl @@ -0,0 +1,22 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity issue is + port (bar : in std_logic_vector (3 downto 0); + foobar : out std_logic); +end issue; + +architecture beh of issue is + function foo (bar: std_logic_vector) return std_logic is + variable i : integer range 0 to 2 := 0; + begin + loop + exit when bar (i) = '0'; + i := i + 1; + end loop; + + return bar (i); + end function foo; +begin + foobar <= foo (bar); +end architecture; diff --git a/testsuite/synth/issue1242/testsuite.sh b/testsuite/synth/issue1242/testsuite.sh new file mode 100755 index 000000000..0eb271e62 --- /dev/null +++ b/testsuite/synth/issue1242/testsuite.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +. ../../testenv.sh + +synth_failure issue.vhdl -e + +echo "Test successful" |