diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-03-19 20:24:15 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-03-19 20:24:15 +0100 |
commit | 2bd2787adfea419435d001cf95f556eb9b120512 (patch) | |
tree | 77413b20e703ab817de55d2c68357ee96afd4285 /testsuite | |
parent | 6094361eab9089f97a0851844d64d40d1ebc5c82 (diff) | |
download | ghdl-2bd2787adfea419435d001cf95f556eb9b120512.tar.gz ghdl-2bd2787adfea419435d001cf95f556eb9b120512.tar.bz2 ghdl-2bd2787adfea419435d001cf95f556eb9b120512.zip |
testsuite/gna: add a test for #1688
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue1688/test1.vhdl | 32 | ||||
-rw-r--r-- | testsuite/gna/issue1688/test2.vhdl | 37 | ||||
-rwxr-xr-x | testsuite/gna/issue1688/testsuite.sh | 11 |
3 files changed, 80 insertions, 0 deletions
diff --git a/testsuite/gna/issue1688/test1.vhdl b/testsuite/gna/issue1688/test1.vhdl new file mode 100644 index 000000000..1f6b49019 --- /dev/null +++ b/testsuite/gna/issue1688/test1.vhdl @@ -0,0 +1,32 @@ +package test3 is + type t_prot is protected + end protected t_prot; +end package; +package body test3 is + type t_prot is protected body + end protected body t_prot; +end package body; + +package test2 is + shared variable shared_var : work.test3.t_prot; +end package; + +package test1 is + alias shared_var_2 is work.test2.shared_var; +end package; + +use work.test1.all; + +entity test is +end test; + +architecture behav of test is +begin + process + begin + shared_var_2.proc; + report "done"; + wait; + end process; +end behav; + diff --git a/testsuite/gna/issue1688/test2.vhdl b/testsuite/gna/issue1688/test2.vhdl new file mode 100644 index 000000000..77a265322 --- /dev/null +++ b/testsuite/gna/issue1688/test2.vhdl @@ -0,0 +1,37 @@ +package test3 is + type t_prot is protected + procedure proc; + end protected t_prot; +end package; +package body test3 is + type t_prot is protected body + procedure proc is + begin + report "proc"; + end proc; + end protected body t_prot; +end package body; + +package test2 is + shared variable shared_var : work.test3.t_prot; +end package; + +package test1 is + alias shared_var_2 is work.test2.shared_var; +end package; + +use work.test1.all; + +entity test is +end test; + +architecture behav of test is +begin + process + begin + shared_var_2.proc; + report "done"; + wait; + end process; +end behav; + diff --git a/testsuite/gna/issue1688/testsuite.sh b/testsuite/gna/issue1688/testsuite.sh new file mode 100755 index 000000000..5946b8316 --- /dev/null +++ b/testsuite/gna/issue1688/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze test2.vhdl +elab_simulate test + +clean + +echo "Test successful" |