aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue946
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-30 01:21:34 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-30 01:21:34 +0200
commitc93cda5fc40a252f52b00745e1126abf6f06d567 (patch)
tree0702012c7cce9ef9ee48d763d244c35b0c248bd2 /testsuite/synth/issue946
parente7c2690467b8f0fc3ac85f07843b45723204c86e (diff)
downloadghdl-c93cda5fc40a252f52b00745e1126abf6f06d567.tar.gz
ghdl-c93cda5fc40a252f52b00745e1126abf6f06d567.tar.bz2
ghdl-c93cda5fc40a252f52b00745e1126abf6f06d567.zip
testsuite/synth: add testcase for #946
Diffstat (limited to 'testsuite/synth/issue946')
-rw-r--r--testsuite/synth/issue946/ent.vhdl23
-rwxr-xr-xtestsuite/synth/issue946/testsuite.sh11
2 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/synth/issue946/ent.vhdl b/testsuite/synth/issue946/ent.vhdl
new file mode 100644
index 000000000..a63db2903
--- /dev/null
+++ b/testsuite/synth/issue946/ent.vhdl
@@ -0,0 +1,23 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity ent is
+ port (
+ i : in bit;
+ o : out bit
+ );
+end;
+
+architecture a of ent is
+ signal test : std_logic_vector(7 downto 0);
+ alias a : std_logic_vector(3 downto 0) is test(7 downto 4);
+begin
+ process(i)
+ begin
+ case a(1 downto 0) is
+ when others =>
+ end case;
+
+ o <= i;
+ end process;
+end;
diff --git a/testsuite/synth/issue946/testsuite.sh b/testsuite/synth/issue946/testsuite.sh
new file mode 100755
index 000000000..54e687d28
--- /dev/null
+++ b/testsuite/synth/issue946/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+for f in ent; do
+ synth $f.vhdl -e $f > syn_$f.vhdl
+# analyze syn_$f.vhdl
+done
+clean
+
+echo "Test successful"