aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-02-04 08:15:18 +0100
committerTristan Gingold <tgingold@free.fr>2021-02-04 08:16:00 +0100
commit8e0c7e8fd994fc5dc0cbf6bd0b2179128315aef2 (patch)
tree9e345b558c31690fc6292f3affcdf53972e74198 /testsuite
parent63c58468dbe996c59b17869ed1a935e4e47e5027 (diff)
downloadghdl-8e0c7e8fd994fc5dc0cbf6bd0b2179128315aef2.tar.gz
ghdl-8e0c7e8fd994fc5dc0cbf6bd0b2179128315aef2.tar.bz2
ghdl-8e0c7e8fd994fc5dc0cbf6bd0b2179128315aef2.zip
testsuite/synth: add a test for #1628
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/issue1628/test.vhdl17
-rw-r--r--testsuite/synth/issue1628/test2.vhdl14
-rwxr-xr-xtestsuite/synth/issue1628/testsuite.sh9
3 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/synth/issue1628/test.vhdl b/testsuite/synth/issue1628/test.vhdl
new file mode 100644
index 000000000..c7de976c1
--- /dev/null
+++ b/testsuite/synth/issue1628/test.vhdl
@@ -0,0 +1,17 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std_unsigned.all;
+
+entity test is
+end entity test;
+
+architecture synthesis of test is
+
+ signal a : std_logic_vector(3 downto 0);
+
+begin
+
+ a <= to_stdlogicvector(10, 4);
+
+end architecture synthesis;
+
diff --git a/testsuite/synth/issue1628/test2.vhdl b/testsuite/synth/issue1628/test2.vhdl
new file mode 100644
index 000000000..93f2d094a
--- /dev/null
+++ b/testsuite/synth/issue1628/test2.vhdl
@@ -0,0 +1,14 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std_unsigned.all;
+
+entity test2 is
+ port (
+ a : out std_logic_vector(3 downto 0));
+end entity test2;
+
+architecture synthesis of test2 is
+begin
+ a <= to_stdlogicvector(10, 4);
+end architecture synthesis;
+
diff --git a/testsuite/synth/issue1628/testsuite.sh b/testsuite/synth/issue1628/testsuite.sh
new file mode 100755
index 000000000..df2069561
--- /dev/null
+++ b/testsuite/synth/issue1628/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+synth_only test
+synth_only test2
+
+echo "Test successful"