diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue1268/ent.vhdl | 47 | ||||
-rw-r--r-- | testsuite/gna/issue1268/mwe_pkg.vhd | 23 | ||||
-rwxr-xr-x | testsuite/gna/issue1268/testsuite.sh | 11 |
3 files changed, 81 insertions, 0 deletions
diff --git a/testsuite/gna/issue1268/ent.vhdl b/testsuite/gna/issue1268/ent.vhdl new file mode 100644 index 000000000..84068ccc9 --- /dev/null +++ b/testsuite/gna/issue1268/ent.vhdl @@ -0,0 +1,47 @@ +use work.mwe_pkg.all; + +entity ent is +end; + +architecture behav of ent is + function f1 (a, b : boolean) return integer is + begin + return 1; + end f1; + + procedure p2 (v : bit_vector (3 downto 0)) is + begin + null; + end p2; + + subtype byte is bit_vector (7 downto 0); + procedure p3 (a, b : byte) is + begin + null; + end p3; + + procedure p4 (t : std.standard.natural range 0 to 4) is + begin + null; + end p4; + + shared variable v : mwe_t; +begin + process + begin + v.send_random_data; + report f1'path_name; + assert f1'path_name = ":ent:f1[boolean,boolean return integer]:" + severity failure; + report p2'path_name; + assert p2'path_name = ":ent:p2[bit_vector]:" + severity failure; + report p3'path_name; + assert p3'path_name = ":ent:p3[byte,byte]:" + severity failure; + report p4'path_name; + assert p4'path_name = ":ent:p4[natural]:" + severity failure; + wait; + end process; +end behav; diff --git a/testsuite/gna/issue1268/mwe_pkg.vhd b/testsuite/gna/issue1268/mwe_pkg.vhd new file mode 100644 index 000000000..b756dc7f6 --- /dev/null +++ b/testsuite/gna/issue1268/mwe_pkg.vhd @@ -0,0 +1,23 @@ +package mwe_pkg is
+ type mwe_t is protected
+ procedure send_random_data (
+ constant num_bits : integer range 1 to 32 := 1
+ );
+
+ end protected;
+
+end package;
+
+package body mwe_pkg is
+ type mwe_t is protected body
+ procedure send_random_data (
+ constant num_bits : integer range 1 to 32 := 1
+ ) is
+ variable rnd : boolean;
+ begin
+ -- init random seed
+ report rnd'instance_name;
+ end procedure;
+ end protected body;
+
+end package body;
diff --git a/testsuite/gna/issue1268/testsuite.sh b/testsuite/gna/issue1268/testsuite.sh new file mode 100755 index 000000000..d17572b9b --- /dev/null +++ b/testsuite/gna/issue1268/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze mwe_pkg.vhd ent.vhdl +elab_simulate ent + +clean + +echo "Test successful" |