aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue609
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-06-16 18:38:49 +0200
committerTristan Gingold <tgingold@free.fr>2018-06-16 18:38:49 +0200
commita3524ea3265ab4c135d1fa3461466ba0a7d8dfac (patch)
tree9895d177f1df3f647994b7d60673e6576e162f3a /testsuite/gna/issue609
parent4e35568a0d342d1059f8f9b56affa7799b828e0d (diff)
downloadghdl-a3524ea3265ab4c135d1fa3461466ba0a7d8dfac.tar.gz
ghdl-a3524ea3265ab4c135d1fa3461466ba0a7d8dfac.tar.bz2
ghdl-a3524ea3265ab4c135d1fa3461466ba0a7d8dfac.zip
Add testcase for #609
Diffstat (limited to 'testsuite/gna/issue609')
-rw-r--r--testsuite/gna/issue609/test.vhd25
-rwxr-xr-xtestsuite/gna/issue609/testsuite.sh10
2 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/gna/issue609/test.vhd b/testsuite/gna/issue609/test.vhd
new file mode 100644
index 000000000..998d5e576
--- /dev/null
+++ b/testsuite/gna/issue609/test.vhd
@@ -0,0 +1,25 @@
+library ieee;
+use ieee.std_logic_1164.all ;
+entity foo is
+
+ port (
+ addr : in std_logic_vector(3 downto 0);
+ data_in : out std_logic_vector(31 downto 0);
+ data_out : out std_logic_vector(31 downto 0)
+ );
+
+end entity foo;
+architecture simple of foo is
+ type mem_type is array (5 downto 0) of std_logic_vector(31 downto 0);
+ signal mem : mem_type ;
+
+begin -- architecture simple
+
+ foop: process (all) is
+ begin -- process foop
+ mem[address]<=data_in;
+ -- The above code is erronous but instead of flaging an error the compiler
+ -- crashes
+ -- mem(address)<=data_in;
+ end process foop;
+end architecture simple;
diff --git a/testsuite/gna/issue609/testsuite.sh b/testsuite/gna/issue609/testsuite.sh
new file mode 100755
index 000000000..f39495609
--- /dev/null
+++ b/testsuite/gna/issue609/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze_failure test.vhd
+
+clean
+
+echo "Test successful"