aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/issue2155/closely_related_arrays.vhdl13
-rw-r--r--testsuite/gna/issue2155/e.vhdl12
-rw-r--r--testsuite/gna/issue2155/err.vhdl9
-rwxr-xr-xtestsuite/gna/issue2155/testsuite.sh12
4 files changed, 46 insertions, 0 deletions
diff --git a/testsuite/gna/issue2155/closely_related_arrays.vhdl b/testsuite/gna/issue2155/closely_related_arrays.vhdl
new file mode 100644
index 000000000..444a2b27d
--- /dev/null
+++ b/testsuite/gna/issue2155/closely_related_arrays.vhdl
@@ -0,0 +1,13 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+package closely_related_arrays is
+
+ type sulv_vector is array (natural range <>) of std_ulogic_vector;
+ type unsigned_vector is array (natural range <>) of u_unsigned;
+
+ constant sv : sulv_vector(1 downto 0)(7 downto 0) := (1 => x"FF", 0 => x"00");
+ constant uv : unsigned_vector(sv'range)(sv'element'range) := unsigned_vector(sv);
+
+end package;
diff --git a/testsuite/gna/issue2155/e.vhdl b/testsuite/gna/issue2155/e.vhdl
new file mode 100644
index 000000000..9c820566f
--- /dev/null
+++ b/testsuite/gna/issue2155/e.vhdl
@@ -0,0 +1,12 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+use work.closely_related_arrays.all;
+
+entity e is
+end;
+
+architecture behav of e is
+begin
+ assert sv (1) = std_logic_vector (uv (1)) severity failure;
+end behav;
diff --git a/testsuite/gna/issue2155/err.vhdl b/testsuite/gna/issue2155/err.vhdl
new file mode 100644
index 000000000..c3ca10383
--- /dev/null
+++ b/testsuite/gna/issue2155/err.vhdl
@@ -0,0 +1,9 @@
+use work.closely_related_arrays.all;
+
+entity e is
+end;
+
+architecture behav of e is
+begin
+ assert sv (1) = sv (1) severity failure;
+end behav;
diff --git a/testsuite/gna/issue2155/testsuite.sh b/testsuite/gna/issue2155/testsuite.sh
new file mode 100755
index 000000000..503c93612
--- /dev/null
+++ b/testsuite/gna/issue2155/testsuite.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze closely_related_arrays.vhdl
+analyze e.vhdl
+elab_simulate e
+
+clean
+
+echo "Test successful"