diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-07-27 19:07:15 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-07-27 19:07:15 +0200 |
commit | 4bfaa10014d923f1e27aca563362f9f389e9e4a2 (patch) | |
tree | 3995d9fbe62a7b43a52efe9dc28e6347e0be004f /testsuite/gna/bug0117 | |
parent | 89f81ef02c4fb9d0441a2b1c773c8e9da79cda5a (diff) | |
download | ghdl-4bfaa10014d923f1e27aca563362f9f389e9e4a2.tar.gz ghdl-4bfaa10014d923f1e27aca563362f9f389e9e4a2.tar.bz2 ghdl-4bfaa10014d923f1e27aca563362f9f389e9e4a2.zip |
testsuite/gna: add a testcase for previous commit.
Diffstat (limited to 'testsuite/gna/bug0117')
-rw-r--r-- | testsuite/gna/bug0117/repro13.vhdl | 26 | ||||
-rwxr-xr-x | testsuite/gna/bug0117/testsuite.sh | 2 |
2 files changed, 27 insertions, 1 deletions
diff --git a/testsuite/gna/bug0117/repro13.vhdl b/testsuite/gna/bug0117/repro13.vhdl new file mode 100644 index 000000000..fbd18122d --- /dev/null +++ b/testsuite/gna/bug0117/repro13.vhdl @@ -0,0 +1,26 @@ +entity repro13 is +end; + +architecture behav of repro13 is + type my_arr is array (natural range <>) of bit_vector; + + procedure assign (signal v : inout my_arr; d : my_arr) is + begin + v (d'length - 1 downto 0) <= d; + end assign; + signal s1 : my_arr (2 downto 0)(3 downto 0); +begin + process + variable v0 : my_arr (1 downto 0)(3 downto 0); + begin + v0 := (x"1", x"2"); + s1 <= (x"5", x"4", x"3"); + wait for 1 ns; + assign (s1, v0); + wait for 1 ns; + assert s1(2) = x"5"; + assert s1(1) = x"1"; + assert s1(0) = x"2"; + wait; + end process; +end behav; diff --git a/testsuite/gna/bug0117/testsuite.sh b/testsuite/gna/bug0117/testsuite.sh index bcf7bfba2..aee4e9ab7 100755 --- a/testsuite/gna/bug0117/testsuite.sh +++ b/testsuite/gna/bug0117/testsuite.sh @@ -3,7 +3,7 @@ . ../../testenv.sh export GHDL_STD_FLAGS=--std=08 -for i in repro1 repro4 repro5 repro6 repro7 repro8 repro12; do +for i in repro1 repro4 repro5 repro6 repro7 repro8 repro12 repro13; do analyze $i.vhdl elab_simulate $i done |