aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-08-24 21:07:53 +0200
committerTristan Gingold <tgingold@free.fr>2020-08-25 18:13:53 +0200
commit2d7db512006d2d3fba09851970959640842f4435 (patch)
treed7b3494741c3ce0d1bfd7b02c071d3321842d5c7 /testsuite
parenta8d4774582470c6c67f6520e9ae83f89dbd5c7d4 (diff)
downloadghdl-2d7db512006d2d3fba09851970959640842f4435.tar.gz
ghdl-2d7db512006d2d3fba09851970959640842f4435.tar.bz2
ghdl-2d7db512006d2d3fba09851970959640842f4435.zip
testsuite/gna: add reproducer for #1440
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue1440/tb_last_value_bug.vhdl17
-rwxr-xr-xtestsuite/gna/issue1440/testsuite.sh11
2 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/gna/issue1440/tb_last_value_bug.vhdl b/testsuite/gna/issue1440/tb_last_value_bug.vhdl
new file mode 100644
index 000000000..a8bdcf50c
--- /dev/null
+++ b/testsuite/gna/issue1440/tb_last_value_bug.vhdl
@@ -0,0 +1,17 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity tb_last_value_bug is
+end entity;
+
+architecture tb of tb_last_value_bug is
+ signal cnt : std_logic_vector(3 downto 0) := (others=>'0');
+begin
+ process
+ begin
+ wait for 10 ns;
+ cnt <= std_logic_vector(unsigned(cnt) + 1);
+ report "cnt: value = " & to_string(cnt) & " last_value = " & to_string(cnt'last_value) ;
+ end process;
+end architecture;
diff --git a/testsuite/gna/issue1440/testsuite.sh b/testsuite/gna/issue1440/testsuite.sh
new file mode 100755
index 000000000..fdbd32d58
--- /dev/null
+++ b/testsuite/gna/issue1440/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze tb_last_value_bug.vhdl
+elab_simulate tb_last_value_bug --stop-time=50ns
+
+clean
+
+echo "Test successful"