diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-11-01 18:42:27 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-11-01 18:42:27 +0100 |
commit | e18e9569ee6748f46bea65eccd078f3d4f2cee22 (patch) | |
tree | b9df52c48f470e4fa68592cd6516c64e505954d2 /testsuite | |
parent | cde9eb6dd49913bec123c376f9a4549b2621babe (diff) | |
download | ghdl-e18e9569ee6748f46bea65eccd078f3d4f2cee22.tar.gz ghdl-e18e9569ee6748f46bea65eccd078f3d4f2cee22.tar.bz2 ghdl-e18e9569ee6748f46bea65eccd078f3d4f2cee22.zip |
testsuite/synth: add testcase for #1503
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/synth/issue1503/testsuite.sh | 7 | ||||
-rw-r--r-- | testsuite/synth/issue1503/theunit.vhdl | 22 |
2 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/synth/issue1503/testsuite.sh b/testsuite/synth/issue1503/testsuite.sh new file mode 100755 index 000000000..080c84be1 --- /dev/null +++ b/testsuite/synth/issue1503/testsuite.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +. ../../testenv.sh + +synth theunit.vhdl -e + +echo "Test successful" diff --git a/testsuite/synth/issue1503/theunit.vhdl b/testsuite/synth/issue1503/theunit.vhdl new file mode 100644 index 000000000..a8b2e0b3c --- /dev/null +++ b/testsuite/synth/issue1503/theunit.vhdl @@ -0,0 +1,22 @@ +library ieee; +use ieee.std_logic_1164.all; +entity theunit is + port (a : in std_ulogic); +end; + +architecture rtl of theunit is +begin + comb : process (a) + variable c : natural range 0 to 3; + variable d : std_ulogic_vector(3 downto 0); + begin + if a = '1' then + for i in 0 to 2 loop + exit; + end loop; + end if; + c := 0; + d := (others => '0'); + d(c) := '1'; + end process; +end; |