diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-04-14 19:02:48 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-04-14 19:02:48 +0200 |
commit | 38406399ca313e24be03a1a5b1b9e0178cfebc20 (patch) | |
tree | cb604d3759980532d314d1ca73b4e5a3f1abccb2 | |
parent | a40c12412c9e159ebe9276262f9257cc8cdaccbf (diff) | |
download | ghdl-38406399ca313e24be03a1a5b1b9e0178cfebc20.tar.gz ghdl-38406399ca313e24be03a1a5b1b9e0178cfebc20.tar.bz2 ghdl-38406399ca313e24be03a1a5b1b9e0178cfebc20.zip |
testsuite/gna: add a test for #2410
-rw-r--r-- | testsuite/gna/issue2410/test.vhdl | 28 | ||||
-rwxr-xr-x | testsuite/gna/issue2410/testsuite.sh | 11 |
2 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/gna/issue2410/test.vhdl b/testsuite/gna/issue2410/test.vhdl new file mode 100644 index 000000000..280452526 --- /dev/null +++ b/testsuite/gna/issue2410/test.vhdl @@ -0,0 +1,28 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity test is +end entity test; +architecture beh of test is + type t_slv_array is array (natural range <>) of std_logic_vector; + subtype t_word_array is t_slv_array(open)(15 downto 0); + + procedure test_proc( + variable sig : out t_word_array) + is + variable v_sig : t_word_array(0 to sig'length); + begin + v_sig := (others => x"AAAA"); + sig := v_sig(1 to sig'length); + end procedure; +begin + + process + variable v_sig : t_word_array(0 to 0); + begin + test_proc(v_sig); + wait; + end process; + +end architecture beh; diff --git a/testsuite/gna/issue2410/testsuite.sh b/testsuite/gna/issue2410/testsuite.sh new file mode 100755 index 000000000..1d84c0f57 --- /dev/null +++ b/testsuite/gna/issue2410/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze test.vhdl +elab_simulate test + +clean + +echo "Test successful" |