aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue1759/repro.vhdl18
-rwxr-xr-xtestsuite/gna/issue1759/testsuite.sh20
2 files changed, 38 insertions, 0 deletions
diff --git a/testsuite/gna/issue1759/repro.vhdl b/testsuite/gna/issue1759/repro.vhdl
new file mode 100644
index 000000000..a4a932531
--- /dev/null
+++ b/testsuite/gna/issue1759/repro.vhdl
@@ -0,0 +1,18 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity repro is
+end;
+
+architecture behav of repro is
+ signal s : std_logic := '0';
+begin
+ process
+ begin
+ for v in std_logic loop
+ s <= v;
+ wait for 1 ns;
+ end loop;
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/issue1759/testsuite.sh b/testsuite/gna/issue1759/testsuite.sh
new file mode 100755
index 000000000..bf1a421e0
--- /dev/null
+++ b/testsuite/gna/issue1759/testsuite.sh
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze repro.vhdl
+elab repro
+if ghdl_has_feature repro vcd; then
+ simulate repro --vcd=repro-std.vcd
+ simulate repro --vcd=repro-vlg.vcd --vcd-4states
+
+ if fgrep -q "U!" repro-vlg.vcd; then
+ echo "error: non-verilog state in vcd"
+ exit 1;
+ fi
+fi
+
+clean
+rm -f repro-*.vcd
+
+echo "Test successful"