aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreine <6628437+eine@users.noreply.github.com>2020-01-12 08:12:55 +0000
committertgingold <tgingold@users.noreply.github.com>2020-01-12 09:12:55 +0100
commit655f95831416043989e23dfc629e480aae0123dd (patch)
tree6428cb5a52c40017cfc90b9b5f7d9b9a9384423a
parent490ae80a76425de77a47b6e2be4f749e068fc303 (diff)
downloadghdl-655f95831416043989e23dfc629e480aae0123dd.tar.gz
ghdl-655f95831416043989e23dfc629e480aae0123dd.tar.bz2
ghdl-655f95831416043989e23dfc629e480aae0123dd.zip
testsuite/synth: add test from #1082 (#1085)
-rw-r--r--testsuite/synth/issue1082/ent.vhdl18
-rwxr-xr-xtestsuite/synth/issue1082/testsuite.sh9
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/issue1082/ent.vhdl b/testsuite/synth/issue1082/ent.vhdl
new file mode 100644
index 000000000..7765e6a70
--- /dev/null
+++ b/testsuite/synth/issue1082/ent.vhdl
@@ -0,0 +1,18 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity test is
+ port(
+ a_in : in std_logic_vector(31 downto 0);
+ b_out : out std_logic_vector(31 downto 0)
+ );
+end test;
+
+architecture rtl of test is
+begin
+ process(all)
+ begin
+ b_out <= std_logic_vector(to_unsigned((31-to_integer(unsigned(a_in))) / 4, 32));
+ end process;
+end; \ No newline at end of file
diff --git a/testsuite/synth/issue1082/testsuite.sh b/testsuite/synth/issue1082/testsuite.sh
new file mode 100755
index 000000000..26a25c13f
--- /dev/null
+++ b/testsuite/synth/issue1082/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+
+synth ent.vhdl -e
+
+echo "Test successful"