diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-06-16 18:41:45 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-06-16 18:41:45 +0200 |
commit | c429d3e572d8ef2b8d9f7a24bd1a16f8ab8c42a6 (patch) | |
tree | 30e88b7aaf50e5f7196109599640ef1d514307e5 /testsuite/gna | |
parent | 9dbe65d4db54dd5d44e2d140fa008e3150b882de (diff) | |
download | ghdl-c429d3e572d8ef2b8d9f7a24bd1a16f8ab8c42a6.tar.gz ghdl-c429d3e572d8ef2b8d9f7a24bd1a16f8ab8c42a6.tar.bz2 ghdl-c429d3e572d8ef2b8d9f7a24bd1a16f8ab8c42a6.zip |
Add testcase for previous patch.
Diffstat (limited to 'testsuite/gna')
-rw-r--r-- | testsuite/gna/bug074/repro.vhdl | 30 | ||||
-rwxr-xr-x | testsuite/gna/bug074/testsuite.sh | 11 |
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" |