aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue238/call1.vhdl18
-rw-r--r--testsuite/gna/issue238/call2.vhdl18
-rw-r--r--testsuite/gna/issue238/sig1.vhdl9
-rwxr-xr-xtestsuite/gna/issue238/testsuite.sh11
4 files changed, 55 insertions, 1 deletions
diff --git a/testsuite/gna/issue238/call1.vhdl b/testsuite/gna/issue238/call1.vhdl
new file mode 100644
index 000000000..0f9a42283
--- /dev/null
+++ b/testsuite/gna/issue238/call1.vhdl
@@ -0,0 +1,18 @@
+entity call1 is
+end;
+
+use work.pkg.all;
+
+architecture behav of call1 is
+ function func return rec is
+ variable res : rec_4;
+ begin
+ return res;
+ end func;
+begin
+ process
+ variable v : rec_4 := func;
+ begin
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/issue238/call2.vhdl b/testsuite/gna/issue238/call2.vhdl
new file mode 100644
index 000000000..d5bad46cb
--- /dev/null
+++ b/testsuite/gna/issue238/call2.vhdl
@@ -0,0 +1,18 @@
+entity call2 is
+end;
+
+use work.pkg.all;
+
+architecture behav of call2 is
+ function func return rec is
+ variable res : rec_4;
+ begin
+ return res;
+ end func;
+begin
+ process
+ constant v : rec := func;
+ begin
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/issue238/sig1.vhdl b/testsuite/gna/issue238/sig1.vhdl
new file mode 100644
index 000000000..1a1d4c441
--- /dev/null
+++ b/testsuite/gna/issue238/sig1.vhdl
@@ -0,0 +1,9 @@
+entity sig1 is
+end;
+
+use work.pkg.all;
+
+architecture behav of sig1 is
+ signal s : rec_4;
+begin
+end behav;
diff --git a/testsuite/gna/issue238/testsuite.sh b/testsuite/gna/issue238/testsuite.sh
index 368be0f47..9c17b1ff2 100755
--- a/testsuite/gna/issue238/testsuite.sh
+++ b/testsuite/gna/issue238/testsuite.sh
@@ -8,9 +8,18 @@ export GHDL_STD_FLAGS=--std=08
analyze cst.vhdl pkg.vhdl
analyze var1.vhdl var2.vhdl var3.vhdl var4.vhdl
-analyze assign1.vhdl proc1.vhdl
+analyze assign1.vhdl proc1.vhdl
elab_simulate proc1
+analyze sig1.vhdl
+elab_simulate sig1
+
+analyze call1.vhdl
+elab_simulate call1
+
+analyze call2.vhdl
+elab_simulate call2
+
clean
echo "Test successful"