aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug0117/repro1.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-07-01 21:28:55 +0200
committerTristan Gingold <tgingold@free.fr>2020-07-01 21:28:55 +0200
commit6bc221560e88b7e5b6977ab0811f48f192db064a (patch)
tree73b8ffd20264c2c4e817cc003573c3e57b9a03ae /testsuite/gna/bug0117/repro1.vhdl
parent84f15226f84de0f81b60ae7cfdf6abbc52550f8b (diff)
downloadghdl-6bc221560e88b7e5b6977ab0811f48f192db064a.tar.gz
ghdl-6bc221560e88b7e5b6977ab0811f48f192db064a.tar.bz2
ghdl-6bc221560e88b7e5b6977ab0811f48f192db064a.zip
testsuite/gna: add tests for previous commit.
Diffstat (limited to 'testsuite/gna/bug0117/repro1.vhdl')
-rw-r--r--testsuite/gna/bug0117/repro1.vhdl23
1 files changed, 23 insertions, 0 deletions
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;