From 6bc221560e88b7e5b6977ab0811f48f192db064a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 1 Jul 2020 21:28:55 +0200 Subject: testsuite/gna: add tests for previous commit. --- testsuite/gna/bug0117/repro1.vhdl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 testsuite/gna/bug0117/repro1.vhdl (limited to 'testsuite/gna/bug0117/repro1.vhdl') diff --git a/testsuite/gna/bug0117/repro1.vhdl b/testsuite/gna/bug0117/repro1.vhdl new file mode 100644 index 000000000..5d8909b64 --- /dev/null +++ b/testsuite/gna/bug0117/repro1.vhdl @@ -0,0 +1,23 @@ +entity repro1 is +end repro1; + +architecture behav of repro1 is + type bv_array is array(natural range <>) of bit_vector; + type bv_array_ptr is access bv_array; + + procedure reshape (d : bv_array) is + constant word_len : natural := d(d'low)'length; + variable sym : bv_array_ptr; + begin + sym := new bv_array (0 to d'length - 1)(word_len - 1 downto 0); + sym.all := d; + end; + + signal s : bv_array(1 to 2)(7 downto 0); +begin + process + begin + reshape(s); + wait; + end process; +end behav; -- cgit v1.2.3