aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/bug074/repro.vhdl30
-rwxr-xr-xtestsuite/gna/bug074/testsuite.sh11
2 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/gna/bug074/repro.vhdl b/testsuite/gna/bug074/repro.vhdl
new file mode 100644
index 000000000..c0316ec4e
--- /dev/null
+++ b/testsuite/gna/bug074/repro.vhdl
@@ -0,0 +1,30 @@
+package pkg is
+ procedure proc (a : bit_vector; r : out bit);
+end pkg;
+
+package body pkg is
+ procedure proc (a : bit_vector; r : out bit)
+ is
+ variable v1, v2 : bit_vector (1 to 2 * a'length);
+ begin
+ v1 := a & a;
+ v2 := a & a;
+ r := '0';
+ end proc;
+end pkg;
+
+entity repro is
+end repro;
+
+architecture behav of repro is
+begin
+ process
+ variable v : bit;
+ constant c : bit_vector (1 to 1024) := (1 => '1', others => '0');
+ begin
+ loop
+ work.pkg.proc (c, v);
+ wait for 1 ns;
+ end loop;
+ end process;
+end behav;
diff --git a/testsuite/gna/bug074/testsuite.sh b/testsuite/gna/bug074/testsuite.sh
new file mode 100755
index 000000000..a9e0d9830
--- /dev/null
+++ b/testsuite/gna/bug074/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+# Not a real test, should check for leaks.
+analyze repro.vhdl
+elab_simulate repro --stop-time=1us
+
+clean
+
+echo "Test successful"