aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-02-17 06:56:12 +0100
committerTristan Gingold <tgingold@free.fr>2017-02-17 22:09:54 +0100
commit5f6dfc4373418815637a1fa3de15a2d3b025b0ff (patch)
tree3bfd9e35a518f17199d9e110e25236661a078472 /testsuite
parent6ca409f3359d31ddd2815f5bf42973901923c59d (diff)
downloadghdl-5f6dfc4373418815637a1fa3de15a2d3b025b0ff.tar.gz
ghdl-5f6dfc4373418815637a1fa3de15a2d3b025b0ff.tar.bz2
ghdl-5f6dfc4373418815637a1fa3de15a2d3b025b0ff.zip
More tests for unbounded records.
Diffstat (limited to 'testsuite')
-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"