aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1175
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-29 08:29:17 +0200
committerTristan Gingold <tgingold@free.fr>2020-03-29 08:29:17 +0200
commit9f6ac61e196ccf49960bbdb2e7d71cdd96ddd10d (patch)
tree52c8103df73a69b209c354321ffd90540c966fc6 /testsuite/synth/issue1175
parent6739ef05016a6148f899be092a4e9bb4512d0d78 (diff)
downloadghdl-9f6ac61e196ccf49960bbdb2e7d71cdd96ddd10d.tar.gz
ghdl-9f6ac61e196ccf49960bbdb2e7d71cdd96ddd10d.tar.bz2
ghdl-9f6ac61e196ccf49960bbdb2e7d71cdd96ddd10d.zip
testsuite/synth: add tests for #1175
Diffstat (limited to 'testsuite/synth/issue1175')
-rw-r--r--testsuite/synth/issue1175/issue.vhdl14
-rw-r--r--testsuite/synth/issue1175/issue2.vhdl10
-rw-r--r--testsuite/synth/issue1175/issue3.vhdl13
-rwxr-xr-xtestsuite/synth/issue1175/testsuite.sh14
4 files changed, 51 insertions, 0 deletions
diff --git a/testsuite/synth/issue1175/issue.vhdl b/testsuite/synth/issue1175/issue.vhdl
new file mode 100644
index 000000000..f729452c7
--- /dev/null
+++ b/testsuite/synth/issue1175/issue.vhdl
@@ -0,0 +1,14 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity issue is
+ port (foo : in std_logic_vector(32-1 downto 0);
+ bar : out std_logic);
+end issue;
+
+architecture rtl of issue is
+ alias a_bar is foo(foo'high);
+begin
+ bar <= a_bar;
+end architecture;
diff --git a/testsuite/synth/issue1175/issue2.vhdl b/testsuite/synth/issue1175/issue2.vhdl
new file mode 100644
index 000000000..9808a857a
--- /dev/null
+++ b/testsuite/synth/issue1175/issue2.vhdl
@@ -0,0 +1,10 @@
+entity issue2 is
+ port (foo : in bit_vector(32-1 downto 0);
+ bar : out bit);
+end issue2;
+
+architecture rtl of issue2 is
+ alias a_bar is foo(foo'high);
+begin
+ bar <= a_bar;
+end architecture;
diff --git a/testsuite/synth/issue1175/issue3.vhdl b/testsuite/synth/issue1175/issue3.vhdl
new file mode 100644
index 000000000..c7fb4a750
--- /dev/null
+++ b/testsuite/synth/issue1175/issue3.vhdl
@@ -0,0 +1,13 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity issue3 is
+ port (foo : in std_logic_vector(32-1 downto 0);
+ bar : out std_logic);
+end issue3;
+
+architecture rtl of issue3 is
+ alias a_bar is foo(foo'high);
+begin
+ bar <= a_bar;
+end architecture;
diff --git a/testsuite/synth/issue1175/testsuite.sh b/testsuite/synth/issue1175/testsuite.sh
new file mode 100755
index 000000000..5c008e877
--- /dev/null
+++ b/testsuite/synth/issue1175/testsuite.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_analyze issue
+clean
+
+GHDL_STD_FLAGS=--std=08
+synth_analyze issue
+synth_analyze issue2
+synth_analyze issue3
+clean
+
+echo "Test successful"