summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold2014-01-05 08:03:19 +0100
committerTristan Gingold2014-01-05 08:03:19 +0100
commit1cb6bdfbcc35a8510c7ba1148697d26f9cffdcdc (patch)
treec3593da8d51bbcbd8cbbd40058b15a7a80e51e3e /testsuite
parent65908771f2935a41a4ed908cd6bb1efe96831814 (diff)
downloadghdl-1cb6bdfbcc35a8510c7ba1148697d26f9cffdcdc.tar.gz
ghdl-1cb6bdfbcc35a8510c7ba1148697d26f9cffdcdc.tar.bz2
ghdl-1cb6bdfbcc35a8510c7ba1148697d26f9cffdcdc.zip
Translate bit string literals in aggregate. Fix bug18659.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/bug18659/crash.vhd20
-rwxr-xr-xtestsuite/gna/bug18659/testsuite.sh10
2 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/gna/bug18659/crash.vhd b/testsuite/gna/bug18659/crash.vhd
new file mode 100644
index 0000000..deaa17f
--- /dev/null
+++ b/testsuite/gna/bug18659/crash.vhd
@@ -0,0 +1,20 @@
+entity crash is
+
+end entity crash;
+library ieee;
+use ieee.std_logic_1164.all;
+architecture test of crash is
+ type t_mem2D is array
+ (natural range <>, -- Address, specifies one word
+ natural range <> -- Bit positions within a word
+ )
+ of std_logic;
+begin -- architecture test
+ process is
+ variable var_array : t_mem2D(0 to 5, 7 downto 0);
+ begin -- process
+ assert var_array = t_mem2D'(X"DEAD", X"BEEF") report "var array error" severity error;
+ wait;
+ end process;
+end architecture test;
+
diff --git a/testsuite/gna/bug18659/testsuite.sh b/testsuite/gna/bug18659/testsuite.sh
new file mode 100755
index 0000000..8e608bf
--- /dev/null
+++ b/testsuite/gna/bug18659/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze crash.vhd
+elab_simulate crash
+
+clean
+
+echo "Test successful"