aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue2175
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue2175')
-rw-r--r--testsuite/gna/issue2175/tb4.vhdl26
-rwxr-xr-xtestsuite/gna/issue2175/testsuite.sh5
2 files changed, 30 insertions, 1 deletions
diff --git a/testsuite/gna/issue2175/tb4.vhdl b/testsuite/gna/issue2175/tb4.vhdl
new file mode 100644
index 000000000..17b09824c
--- /dev/null
+++ b/testsuite/gna/issue2175/tb4.vhdl
@@ -0,0 +1,26 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity tb4 is
+end;
+
+architecture behav of tb4 is
+ function repeat(val : std_ulogic; n : natural) return std_ulogic_vector
+ is
+ variable res : std_ulogic_vector(n - 1 downto 0);
+ begin
+ -- No aggregate use.
+ for i in res'range loop
+ res (i) := val;
+ end loop;
+ return res;
+ end function;
+
+begin
+ process
+ constant c : std_ulogic_vector (3 downto 0) := ('1', repeat ('0', 3));
+ begin
+ assert c = "1000" severity failure;
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/issue2175/testsuite.sh b/testsuite/gna/issue2175/testsuite.sh
index 8fd8f48a9..62765a44c 100755
--- a/testsuite/gna/issue2175/testsuite.sh
+++ b/testsuite/gna/issue2175/testsuite.sh
@@ -4,7 +4,7 @@
export GHDL_STD_FLAGS=--std=08
-# analyze pkg.vhdl
+analyze pkg.vhdl
analyze tb2.vhdl
elab_simulate tb2
@@ -12,6 +12,9 @@ elab_simulate tb2
analyze tb3.vhdl
elab_simulate tb3
+analyze tb4.vhdl
+elab_simulate tb4
+
clean
echo "Test successful"