aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-11-23 20:27:25 +0100
committerTristan Gingold <tgingold@free.fr>2016-12-05 03:25:21 +0100
commit61e8720cc963f83c7ff00d6ec7a3ee289005001b (patch)
tree8279aad18cf14d8c5007522cb907b52e57cb8ded
parente195c1f62558e7896515a5eeff11f21dc8ddb37f (diff)
downloadghdl-61e8720cc963f83c7ff00d6ec7a3ee289005001b.tar.gz
ghdl-61e8720cc963f83c7ff00d6ec7a3ee289005001b.tar.bz2
ghdl-61e8720cc963f83c7ff00d6ec7a3ee289005001b.zip
Add reproducer for issue #209
-rw-r--r--testsuite/gna/issue209/main.vhdl14
-rw-r--r--testsuite/gna/issue209/main2.vhdl17
-rwxr-xr-xtestsuite/gna/issue209/testsuite.sh12
-rw-r--r--testsuite/gna/issue209/util.vhdl3
4 files changed, 46 insertions, 0 deletions
diff --git a/testsuite/gna/issue209/main.vhdl b/testsuite/gna/issue209/main.vhdl
new file mode 100644
index 000000000..75198235a
--- /dev/null
+++ b/testsuite/gna/issue209/main.vhdl
@@ -0,0 +1,14 @@
+library work;
+ use work.all;
+
+package ShiftReg is
+ procedure main(new_sample: integer);
+end package;
+
+package body ShiftReg is
+ procedure main(new_sample: integer) is
+ variable dummy: Util.integer_list_t(0 to 3); -- Here i use the type
+ begin
+ dummy := new_sample & dummy(0 to dummy'high-1); -- Error about missing &
+ end procedure;
+end package body;
diff --git a/testsuite/gna/issue209/main2.vhdl b/testsuite/gna/issue209/main2.vhdl
new file mode 100644
index 000000000..1d8e9f321
--- /dev/null
+++ b/testsuite/gna/issue209/main2.vhdl
@@ -0,0 +1,17 @@
+library work;
+ use work.all;
+
+package ShiftReg is
+ type integer_list_t is array (natural range <>) of integer; -- notice this line
+ procedure main(new_sample: integer);
+end package;
+
+package body ShiftReg is
+
+ procedure main(new_sample: integer) is
+ variable dummy: integer_list_t(0 to 3); -- notice this line
+ begin
+ dummy := new_sample & dummy(0 to dummy'high-1); --no error
+ end procedure;
+
+end package body;
diff --git a/testsuite/gna/issue209/testsuite.sh b/testsuite/gna/issue209/testsuite.sh
new file mode 100755
index 000000000..de9d44773
--- /dev/null
+++ b/testsuite/gna/issue209/testsuite.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze util.vhdl
+analyze_failure main.vhdl
+
+analyze main2.vhdl
+
+clean
+
+echo "Test successful"
diff --git a/testsuite/gna/issue209/util.vhdl b/testsuite/gna/issue209/util.vhdl
new file mode 100644
index 000000000..a86ceaacb
--- /dev/null
+++ b/testsuite/gna/issue209/util.vhdl
@@ -0,0 +1,3 @@
+package Util is
+ type integer_list_t is array (natural range <>) of integer;
+end package;