aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-06-06 20:38:01 +0200
committerTristan Gingold <tgingold@free.fr>2018-06-08 18:20:24 +0200
commit0a20fceb58f4701127e6cae2f3e71b856d6e69dd (patch)
tree6c3db865a9014f48cd22980d1845edb3bf819928 /testsuite
parent26800bcded59eb5a71e784251a07b8f4336dd889 (diff)
downloadghdl-0a20fceb58f4701127e6cae2f3e71b856d6e69dd.tar.gz
ghdl-0a20fceb58f4701127e6cae2f3e71b856d6e69dd.tar.bz2
ghdl-0a20fceb58f4701127e6cae2f3e71b856d6e69dd.zip
Add testcase for #598
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue598/tb.vhd20
-rwxr-xr-xtestsuite/gna/issue598/testsuite.sh11
2 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/gna/issue598/tb.vhd b/testsuite/gna/issue598/tb.vhd
new file mode 100644
index 000000000..3761a6233
--- /dev/null
+++ b/testsuite/gna/issue598/tb.vhd
@@ -0,0 +1,20 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity tb is
+end entity;
+
+architecture tb of tb is
+begin
+ process
+ constant a : std_logic_vector(3 downto 0) := x"A";
+ variable b : std_logic_vector(3 downto 0) := x"B";
+ begin
+ report to_string(b); -- OK
+ report to_string(a); -- fails
+ assert to_string(a) = "1010";
+ assert to_string(b) = "1011";
+ wait;
+ end process;
+end architecture;
+
diff --git a/testsuite/gna/issue598/testsuite.sh b/testsuite/gna/issue598/testsuite.sh
new file mode 100755
index 000000000..6a2798958
--- /dev/null
+++ b/testsuite/gna/issue598/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze tb.vhd
+elab_simulate tb
+
+clean
+
+echo "Test successful"