aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue238/call3.vhdl21
-rw-r--r--testsuite/gna/issue238/call4.vhdl21
-rw-r--r--testsuite/gna/issue238/call5.vhdl27
-rwxr-xr-xtestsuite/gna/issue238/testsuite.sh9
4 files changed, 78 insertions, 0 deletions
diff --git a/testsuite/gna/issue238/call3.vhdl b/testsuite/gna/issue238/call3.vhdl
new file mode 100644
index 000000000..99006447d
--- /dev/null
+++ b/testsuite/gna/issue238/call3.vhdl
@@ -0,0 +1,21 @@
+entity call3 is
+end;
+
+use work.pkg.all;
+
+architecture behav of call3 is
+ procedure p (a : rec) is
+ begin
+ report natural'image (a.s'left);
+ report natural'image (a.s'right);
+ assert a.s'left = 1;
+ assert a.s'right = 4;
+ end;
+begin
+ process
+ variable v : rec_4dyn;
+ begin
+ p (v);
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/issue238/call4.vhdl b/testsuite/gna/issue238/call4.vhdl
new file mode 100644
index 000000000..e40a98489
--- /dev/null
+++ b/testsuite/gna/issue238/call4.vhdl
@@ -0,0 +1,21 @@
+entity call4 is
+end;
+
+use work.pkg.all;
+
+architecture behav of call4 is
+ procedure p (s : string) is
+ begin
+ report natural'image (s'left);
+ report natural'image (s'right);
+ assert s'left = 1;
+ assert s'right = 4;
+ end;
+begin
+ process
+ variable v : rec_4dyn;
+ begin
+ p (v.s);
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/issue238/call5.vhdl b/testsuite/gna/issue238/call5.vhdl
new file mode 100644
index 000000000..0897bfee0
--- /dev/null
+++ b/testsuite/gna/issue238/call5.vhdl
@@ -0,0 +1,27 @@
+entity call5 is
+end;
+
+use work.pkg.all;
+
+architecture behav of call5 is
+ procedure p2 (s : string) is
+ begin
+ report natural'image (s'left);
+ report natural'image (s'right);
+ assert s'left = 1;
+ assert s'right = 4;
+ end;
+
+ procedure p1 (r : rec) is
+ begin
+ p2 (r.s);
+ end p1;
+
+begin
+ process
+ variable v : rec_4dyn;
+ begin
+ p1 (v);
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/issue238/testsuite.sh b/testsuite/gna/issue238/testsuite.sh
index 9c17b1ff2..2fb8c33bb 100755
--- a/testsuite/gna/issue238/testsuite.sh
+++ b/testsuite/gna/issue238/testsuite.sh
@@ -20,6 +20,15 @@ elab_simulate call1
analyze call2.vhdl
elab_simulate call2
+analyze call3.vhdl
+elab_simulate call3
+
+analyze call4.vhdl
+elab_simulate call4
+
+analyze call5.vhdl
+elab_simulate call5
+
clean
echo "Test successful"