aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-19 07:53:18 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-20 08:21:27 +0200
commita269db2277ea3747e09fcfc1b82b977b600932b3 (patch)
treefb9258b8ba5bd5b81d8e71efa88a098b2cb3c952
parent4afe2564d96763b85ec837337a4b1992b8c4bcaa (diff)
downloadghdl-a269db2277ea3747e09fcfc1b82b977b600932b3.tar.gz
ghdl-a269db2277ea3747e09fcfc1b82b977b600932b3.tar.bz2
ghdl-a269db2277ea3747e09fcfc1b82b977b600932b3.zip
testsuite/synth: add test from #1294
-rw-r--r--testsuite/synth/issue1294/generic_array_range.vhdl21
-rwxr-xr-xtestsuite/synth/issue1294/testsuite.sh8
2 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/synth/issue1294/generic_array_range.vhdl b/testsuite/synth/issue1294/generic_array_range.vhdl
new file mode 100644
index 000000000..5b4135f04
--- /dev/null
+++ b/testsuite/synth/issue1294/generic_array_range.vhdl
@@ -0,0 +1,21 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity generic_array_range is
+ generic (
+ SIZE : integer := 1
+ );
+ port (
+ data_in : in std_logic_vector(7 downto 0);
+ data_out : out std_logic_vector(7 downto 0)
+ );
+end;
+
+architecture behavioral of generic_array_range is
+ --constant SIZE : integer := 1;
+ type t_slv_array_1d is array (natural range <>) of std_logic_vector;
+ signal a_slv_tmp : t_slv_array_1d(0 to SIZE-1)(7 downto 0);
+begin
+ a_slv_tmp(0) <= data_in;
+ data_out <= a_slv_tmp(0);
+end behavioral;
diff --git a/testsuite/synth/issue1294/testsuite.sh b/testsuite/synth/issue1294/testsuite.sh
new file mode 100755
index 000000000..7ece1a728
--- /dev/null
+++ b/testsuite/synth/issue1294/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+synth_analyze generic_array_range
+
+echo "Test successful"