aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1311
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-15 07:36:29 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-15 07:36:29 +0200
commitbc31638a6c7ab04bc5e71941dd69ff13e9d19ec7 (patch)
tree3feb8db0f50d19e84ed78da6bff1506cef45b94c /testsuite/synth/issue1311
parentc8c834c7c3934214fb039e8100eda2d8535c7174 (diff)
downloadghdl-bc31638a6c7ab04bc5e71941dd69ff13e9d19ec7.tar.gz
ghdl-bc31638a6c7ab04bc5e71941dd69ff13e9d19ec7.tar.bz2
ghdl-bc31638a6c7ab04bc5e71941dd69ff13e9d19ec7.zip
testsuite/synth: add a test for #1311
Diffstat (limited to 'testsuite/synth/issue1311')
-rw-r--r--testsuite/synth/issue1311/issue.vhdl12
-rw-r--r--testsuite/synth/issue1311/tb_issue.vhdl19
-rwxr-xr-xtestsuite/synth/issue1311/testsuite.sh7
3 files changed, 38 insertions, 0 deletions
diff --git a/testsuite/synth/issue1311/issue.vhdl b/testsuite/synth/issue1311/issue.vhdl
new file mode 100644
index 000000000..41575a46b
--- /dev/null
+++ b/testsuite/synth/issue1311/issue.vhdl
@@ -0,0 +1,12 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity issue is
+ port (foo : out boolean);
+end issue;
+
+architecture beh of issue is
+ signal bar : std_logic_vector (7 downto 0);
+begin
+ foo <= bar (0 downto 1) = bar (1 downto 2);
+end architecture beh;
diff --git a/testsuite/synth/issue1311/tb_issue.vhdl b/testsuite/synth/issue1311/tb_issue.vhdl
new file mode 100644
index 000000000..80e07dba5
--- /dev/null
+++ b/testsuite/synth/issue1311/tb_issue.vhdl
@@ -0,0 +1,19 @@
+entity tb_issue is
+end tb_issue;
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+architecture behav of tb_issue is
+ signal a : boolean;
+begin
+ dut: entity work.issue
+ port map (a);
+
+ process
+ begin
+ wait for 1 ns;
+ assert a severity failure;
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/synth/issue1311/testsuite.sh b/testsuite/synth/issue1311/testsuite.sh
new file mode 100755
index 000000000..d580d8433
--- /dev/null
+++ b/testsuite/synth/issue1311/testsuite.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_tb issue
+
+echo "Test successful"