aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue400/e.vhdl17
-rwxr-xr-xtestsuite/gna/issue400/testsuite.sh11
2 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/gna/issue400/e.vhdl b/testsuite/gna/issue400/e.vhdl
new file mode 100644
index 000000000..7bebb2168
--- /dev/null
+++ b/testsuite/gna/issue400/e.vhdl
@@ -0,0 +1,17 @@
+entity e is end entity;
+architecture a of e is
+ type p is protected
+ function f(a:bit) return boolean;
+ end protected;
+ type p is protected body
+ function f(a:bit) return boolean is begin return a='1'; end function;
+ end protected body;
+ shared variable v :p;
+ component bb1 is port( s :out bit ); end component;
+ component bb2 is port( s :in boolean ); end component;
+ signal s1 :boolean;
+ signal s2 :bit;
+begin
+ i1: component bb1 port map( v.f(s) => s1 );
+ i2: component bb2 port map( s => v.f(s2) );
+end architecture;
diff --git a/testsuite/gna/issue400/testsuite.sh b/testsuite/gna/issue400/testsuite.sh
new file mode 100755
index 000000000..1a4b10413
--- /dev/null
+++ b/testsuite/gna/issue400/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze e.vhdl
+elab_simulate e
+
+clean
+
+echo "Test successful"