aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-07-27 05:43:18 +0200
committerTristan Gingold <tgingold@free.fr>2022-07-27 05:43:18 +0200
commit7120d05a841597f83dcb6247c4c9d6b62f6fdefc (patch)
treede5b8055b0515ce67cafd5c358bf3186d08b9620 /testsuite
parent1f3162b29845bbe75bc0d3fac7d67e3eb60a24a7 (diff)
downloadghdl-7120d05a841597f83dcb6247c4c9d6b62f6fdefc.tar.gz
ghdl-7120d05a841597f83dcb6247c4c9d6b62f6fdefc.tar.bz2
ghdl-7120d05a841597f83dcb6247c4c9d6b62f6fdefc.zip
testsuite/synth: add a test for #2139
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/synth/issue2139/repro.vhdl13
-rwxr-xr-xtestsuite/synth/issue2139/testsuite.sh13
2 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/synth/issue2139/repro.vhdl b/testsuite/synth/issue2139/repro.vhdl
new file mode 100644
index 000000000..e38f2562d
--- /dev/null
+++ b/testsuite/synth/issue2139/repro.vhdl
@@ -0,0 +1,13 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity repro is
+ port (o : out unsigned (7 downto 0);
+ i : in std_logic_vector(7 downto 0));
+end repro;
+
+architecture behav of repro is
+begin
+ o <= unsigned(i) + 1;
+end behav;
diff --git a/testsuite/synth/issue2139/testsuite.sh b/testsuite/synth/issue2139/testsuite.sh
new file mode 100755
index 000000000..206a5b5a2
--- /dev/null
+++ b/testsuite/synth/issue2139/testsuite.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+synth_only repro
+
+GHDL_STD_FLAGS=--std=93
+analyze syn_repro.vhdl
+
+clean
+
+echo "Test successful"