diff options
-rw-r--r-- | testsuite/gna/issue209/main.vhdl | 14 | ||||
-rw-r--r-- | testsuite/gna/issue209/main2.vhdl | 17 | ||||
-rwxr-xr-x | testsuite/gna/issue209/testsuite.sh | 12 | ||||
-rw-r--r-- | testsuite/gna/issue209/util.vhdl | 3 |
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; |