aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-08-24 06:44:06 +0200
committerTristan Gingold <tgingold@free.fr>2018-08-24 06:44:06 +0200
commit5cd3de469b95342dc20e883e8387ff59a752b7e9 (patch)
treea65ef8505a6ec5f28c90c735dab61ebf6b771683 /testsuite
parent6e0eb7b901595fd601598cc3c7800f0bdc714d24 (diff)
downloadghdl-5cd3de469b95342dc20e883e8387ff59a752b7e9.tar.gz
ghdl-5cd3de469b95342dc20e883e8387ff59a752b7e9.tar.bz2
ghdl-5cd3de469b95342dc20e883e8387ff59a752b7e9.zip
Add testcase for #637
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue637/example.vhdl16
-rwxr-xr-xtestsuite/gna/issue637/testsuite.sh11
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/gna/issue637/example.vhdl b/testsuite/gna/issue637/example.vhdl
new file mode 100644
index 000000000..d13664393
--- /dev/null
+++ b/testsuite/gna/issue637/example.vhdl
@@ -0,0 +1,16 @@
+entity example is
+end entity;
+
+architecture tb of example is
+ type arrType is array (1 downto 0) of integer;
+ type arrTypePtr is access arrType;
+begin
+ process (all)
+ variable ptr : arrTypePtr;
+ begin
+ ptr := new arrType'(10, 5); -- works
+ ptr.all(0) := 5; -- crash
+ ptr(0) := 5; --crash
+ end process;
+
+end architecture;
diff --git a/testsuite/gna/issue637/testsuite.sh b/testsuite/gna/issue637/testsuite.sh
new file mode 100755
index 000000000..9cc19eab3
--- /dev/null
+++ b/testsuite/gna/issue637/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze example.vhdl
+elab_simulate example
+
+clean
+
+echo "Test successful"