aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1688
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/gna/issue1688')
-rw-r--r--testsuite/gna/issue1688/test1.vhdl32
-rw-r--r--testsuite/gna/issue1688/test2.vhdl37
-rwxr-xr-xtestsuite/gna/issue1688/testsuite.sh11
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"