summaryrefslogtreecommitdiff
path: root/testsuite/gna/bug023
diff options
context:
space:
mode:
authorTristan Gingold2015-09-02 18:23:37 +0200
committerTristan Gingold2015-09-02 18:23:37 +0200
commit27e107a5196b31de85b3433c8dc616d6d7c7432c (patch)
treea50cf743867305b3e5643b44178fe3a4d62c0d79 /testsuite/gna/bug023
parentd40c73de021a6c07d73a7f17e499f9ba6772f164 (diff)
downloadghdl-27e107a5196b31de85b3433c8dc616d6d7c7432c.tar.gz
ghdl-27e107a5196b31de85b3433c8dc616d6d7c7432c.tar.bz2
ghdl-27e107a5196b31de85b3433c8dc616d6d7c7432c.zip
Add bug023.
Diffstat (limited to 'testsuite/gna/bug023')
-rw-r--r--testsuite/gna/bug023/ppkg.vhdl23
-rw-r--r--testsuite/gna/bug023/ppkg1.vhdl24
-rw-r--r--testsuite/gna/bug023/ppkg1_tb.vhdl14
-rw-r--r--testsuite/gna/bug023/ppkg_tb.vhdl14
-rwxr-xr-xtestsuite/gna/bug023/testsuite.sh13
5 files changed, 88 insertions, 0 deletions
diff --git a/testsuite/gna/bug023/ppkg.vhdl b/testsuite/gna/bug023/ppkg.vhdl
new file mode 100644
index 0000000..408a8dd
--- /dev/null
+++ b/testsuite/gna/bug023/ppkg.vhdl
@@ -0,0 +1,23 @@
+package ppkg is
+ procedure rep1 (msg : string := "failure");
+ procedure rep2;
+ procedure rep3;
+end ppkg;
+
+package body ppkg is
+ procedure rep1 (msg : string := "failure") is
+ begin
+ report msg;
+ end rep1;
+
+ procedure rep2 is
+ begin
+ rep1;
+ rep1;
+ end rep2;
+
+ procedure rep3 is
+ begin
+ rep1;
+ end rep3;
+end ppkg;
diff --git a/testsuite/gna/bug023/ppkg1.vhdl b/testsuite/gna/bug023/ppkg1.vhdl
new file mode 100644
index 0000000..474bb6f
--- /dev/null
+++ b/testsuite/gna/bug023/ppkg1.vhdl
@@ -0,0 +1,24 @@
+package ppkg1 is
+ type line is access string;
+ procedure rep1 (variable msg : line := new string (1 to 7));
+ procedure rep2;
+ procedure rep3;
+end ppkg1;
+
+package body ppkg1 is
+ procedure rep1 (variable msg : line := new string (1 to 7)) is
+ begin
+ msg.all := (msg'range => ' ');
+ end rep1;
+
+ procedure rep2 is
+ begin
+ rep1;
+ rep1;
+ end rep2;
+
+ procedure rep3 is
+ begin
+ rep1;
+ end rep3;
+end ppkg1;
diff --git a/testsuite/gna/bug023/ppkg1_tb.vhdl b/testsuite/gna/bug023/ppkg1_tb.vhdl
new file mode 100644
index 0000000..705b30a
--- /dev/null
+++ b/testsuite/gna/bug023/ppkg1_tb.vhdl
@@ -0,0 +1,14 @@
+entity ppkg1_tb is
+end ppkg1_tb;
+
+use work.ppkg1.all;
+architecture behav of ppkg1_tb is
+begin
+ process
+ begin
+ rep1;
+ rep2;
+ rep3;
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug023/ppkg_tb.vhdl b/testsuite/gna/bug023/ppkg_tb.vhdl
new file mode 100644
index 0000000..f53df91
--- /dev/null
+++ b/testsuite/gna/bug023/ppkg_tb.vhdl
@@ -0,0 +1,14 @@
+entity ppkg_tb is
+end ppkg_tb;
+
+use work.ppkg.all;
+architecture behav of ppkg_tb is
+begin
+ process
+ begin
+ rep1;
+ rep2;
+ rep3;
+ wait;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug023/testsuite.sh b/testsuite/gna/bug023/testsuite.sh
new file mode 100755
index 0000000..0c8ffba
--- /dev/null
+++ b/testsuite/gna/bug023/testsuite.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze ppkg.vhdl ppkg_tb.vhdl
+elab_simulate ppkg_tb
+
+analyze ppkg1.vhdl ppkg1_tb.vhdl
+elab_simulate ppkg1_tb
+
+clean
+
+echo "Test successful"