aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug024
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-09-02 18:24:07 +0200
committerTristan Gingold <tgingold@free.fr>2015-09-02 18:24:07 +0200
commit5bd3c2ccf36ce92257616c709460b0006f4f1f7f (patch)
tree542364882a58e0cf6a822dc89afeb06e31be1d9b /testsuite/gna/bug024
parent27e107a5196b31de85b3433c8dc616d6d7c7432c (diff)
downloadghdl-5bd3c2ccf36ce92257616c709460b0006f4f1f7f.tar.gz
ghdl-5bd3c2ccf36ce92257616c709460b0006f4f1f7f.tar.bz2
ghdl-5bd3c2ccf36ce92257616c709460b0006f4f1f7f.zip
Add bug024 (crash in error message).
Diffstat (limited to 'testsuite/gna/bug024')
-rw-r--r--testsuite/gna/bug024/ppkg.vhdl23
-rw-r--r--testsuite/gna/bug024/ppkg1.vhdl24
-rwxr-xr-xtestsuite/gna/bug024/testsuite.sh10
3 files changed, 57 insertions, 0 deletions
diff --git a/testsuite/gna/bug024/ppkg.vhdl b/testsuite/gna/bug024/ppkg.vhdl
new file mode 100644
index 000000000..408a8dda7
--- /dev/null
+++ b/testsuite/gna/bug024/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/bug024/ppkg1.vhdl b/testsuite/gna/bug024/ppkg1.vhdl
new file mode 100644
index 000000000..88b71289f
--- /dev/null
+++ b/testsuite/gna/bug024/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 ppkg is
+ procedure rep1 (msg : line := new string (1 to 7)) is
+ begin
+ msg.all := (others => ' ');
+ end rep1;
+
+ procedure rep2 is
+ begin
+ rep1;
+ rep1;
+ end rep2;
+
+ procedure rep3 is
+ begin
+ rep1;
+ end rep3;
+end ppkg;
diff --git a/testsuite/gna/bug024/testsuite.sh b/testsuite/gna/bug024/testsuite.sh
new file mode 100755
index 000000000..d0b6db057
--- /dev/null
+++ b/testsuite/gna/bug024/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze ppkg.vhdl
+analyze_failure ppkg1.vhdl
+
+clean
+
+echo "Test successful"