aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-01-07 19:06:52 +0100
committerTristan Gingold <tgingold@free.fr>2019-01-07 19:06:52 +0100
commit1a540a197dee716237953541bc6d3d9c6d9e6002 (patch)
tree829e747d6a1612aac6999d6d06318f9d8eafa03b /testsuite/gna
parentd8dbfb31f087e6290425d6e3fa88e4cffaae32a2 (diff)
downloadghdl-1a540a197dee716237953541bc6d3d9c6d9e6002.tar.gz
ghdl-1a540a197dee716237953541bc6d3d9c6d9e6002.tar.bz2
ghdl-1a540a197dee716237953541bc6d3d9c6d9e6002.zip
Add testcase for #734
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/issue734/test.vhdl15
-rwxr-xr-xtestsuite/gna/issue734/testsuite.sh9
2 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/gna/issue734/test.vhdl b/testsuite/gna/issue734/test.vhdl
new file mode 100644
index 000000000..8104e7fa7
--- /dev/null
+++ b/testsuite/gna/issue734/test.vhdl
@@ -0,0 +1,15 @@
+entity test is
+end test;
+
+architecture arch of test is
+ type natural_vec is array (natural range <>) of natural;
+ type natural_vec_ptr is access natural_vec;
+ procedure bad is
+ variable v : natural_vec_ptr;
+ begin
+ v := new natural_vec_ptr(0 to 9); -- Should give an error, gives assertion failed
+ v := new natural_vec(0 to 9); -- The correct syntax for the above (which works fine)
+ end procedure;
+begin
+end arch;
+
diff --git a/testsuite/gna/issue734/testsuite.sh b/testsuite/gna/issue734/testsuite.sh
new file mode 100755
index 000000000..8e20eb85f
--- /dev/null
+++ b/testsuite/gna/issue734/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure test.vhdl
+
+clean
+
+echo "Test successful"