aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1370
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-06-13 10:15:02 +0200
committerTristan Gingold <tgingold@free.fr>2020-06-13 10:15:02 +0200
commit8eb418a695000718920c2ef5294c185a2ef40cca (patch)
tree47d73b4f3b656d2e4bd6862ed953e0f13a95dc7e /testsuite/gna/issue1370
parente7b9f173b0e9cd090c73d09a5090819b360b46f1 (diff)
downloadghdl-8eb418a695000718920c2ef5294c185a2ef40cca.tar.gz
ghdl-8eb418a695000718920c2ef5294c185a2ef40cca.tar.bz2
ghdl-8eb418a695000718920c2ef5294c185a2ef40cca.zip
testsuite/gna: add test from #1370
Diffstat (limited to 'testsuite/gna/issue1370')
-rw-r--r--testsuite/gna/issue1370/case16.vhdl39
-rwxr-xr-xtestsuite/gna/issue1370/testsuite.sh9
2 files changed, 48 insertions, 0 deletions
diff --git a/testsuite/gna/issue1370/case16.vhdl b/testsuite/gna/issue1370/case16.vhdl
new file mode 100644
index 000000000..719127eb3
--- /dev/null
+++ b/testsuite/gna/issue1370/case16.vhdl
@@ -0,0 +1,39 @@
+entity case16 is
+end entity case16;
+
+architecture rtl of case16 is
+
+begin
+
+ process
+ variable decode : bit_vector(2 downto 0);
+ variable cnt : integer := 0;
+
+ begin
+
+ case decode(1 downto 0) is
+ when "00" =>
+ decode(1 downto 0) := "01";
+ report "Startup ...";
+ wait for 1 ps;
+ when "01" =>
+ decode(1 downto 0) := "11";
+ report "Go Green ...";
+ wait for 10 ps;
+ when "10" =>
+ decode(1 downto 0) := "01";
+ report "Go Red ...";
+ wait for 10 ps;
+ when "011" => ----<<<< line 44
+ decode(1 downto 0) := "10";
+ report "Go Yellow ...";
+ wait for 2 ps;
+ end case;
+
+ cnt := cnt + 1;
+ if cnt = 25 then
+ wait;
+ end if;
+
+ end process;
+end rtl;
diff --git a/testsuite/gna/issue1370/testsuite.sh b/testsuite/gna/issue1370/testsuite.sh
new file mode 100755
index 000000000..f9c0638e6
--- /dev/null
+++ b/testsuite/gna/issue1370/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure case16.vhdl
+
+clean
+
+echo "Test successful"