From 27e107a5196b31de85b3433c8dc616d6d7c7432c Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 2 Sep 2015 18:23:37 +0200 Subject: Add bug023. --- testsuite/gna/bug023/ppkg.vhdl | 23 +++++++++++++++++++++++ testsuite/gna/bug023/ppkg1.vhdl | 24 ++++++++++++++++++++++++ testsuite/gna/bug023/ppkg1_tb.vhdl | 14 ++++++++++++++ testsuite/gna/bug023/ppkg_tb.vhdl | 14 ++++++++++++++ testsuite/gna/bug023/testsuite.sh | 13 +++++++++++++ 5 files changed, 88 insertions(+) create mode 100644 testsuite/gna/bug023/ppkg.vhdl create mode 100644 testsuite/gna/bug023/ppkg1.vhdl create mode 100644 testsuite/gna/bug023/ppkg1_tb.vhdl create mode 100644 testsuite/gna/bug023/ppkg_tb.vhdl create mode 100755 testsuite/gna/bug023/testsuite.sh (limited to 'testsuite') 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" -- cgit