aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-02-13 15:00:18 +0100
committerTristan Gingold <tgingold@free.fr>2021-02-18 07:58:15 +0100
commit93dd7a3edf88dd069d41dd4d52428df99118f774 (patch)
tree52e2f97fb57a576476d71277ff9746f6a258f6a7
parentcdf749d613326bdcab49c164ef16dc5759214373 (diff)
downloadghdl-93dd7a3edf88dd069d41dd4d52428df99118f774.tar.gz
ghdl-93dd7a3edf88dd069d41dd4d52428df99118f774.tar.bz2
ghdl-93dd7a3edf88dd069d41dd4d52428df99118f774.zip
testsuite/gna: add a test for #1646
-rw-r--r--testsuite/gna/issue1646/test.vhdl12
-rwxr-xr-xtestsuite/gna/issue1646/testsuite.sh9
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/gna/issue1646/test.vhdl b/testsuite/gna/issue1646/test.vhdl
new file mode 100644
index 000000000..865eb5414
--- /dev/null
+++ b/testsuite/gna/issue1646/test.vhdl
@@ -0,0 +1,12 @@
+entity test is
+end entity;
+
+architecture arch of test is
+ -- This works:
+ --subtype y_vec is real_vector(0 to 3);
+ --type realvec_file is file of y_vec;
+
+ -- This complains bout 'index constraint not allowed here'
+ type realvec_file is file of real_vector(0 to 3);
+begin
+end arch;
diff --git a/testsuite/gna/issue1646/testsuite.sh b/testsuite/gna/issue1646/testsuite.sh
new file mode 100755
index 000000000..8e20eb85f
--- /dev/null
+++ b/testsuite/gna/issue1646/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure test.vhdl
+
+clean
+
+echo "Test successful"