From 6b218517c8838d68008ab6031debcdbe1ad9bf0e Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 25 Jul 2020 11:32:56 +0200 Subject: testsuite/gna: add a test for unbounded arrays. --- testsuite/gna/bug0117/repro6.vhdl | 24 ++++++++++++++++++++++++ testsuite/gna/bug0117/testsuite.sh | 3 +++ 2 files changed, 27 insertions(+) create mode 100644 testsuite/gna/bug0117/repro6.vhdl (limited to 'testsuite') diff --git a/testsuite/gna/bug0117/repro6.vhdl b/testsuite/gna/bug0117/repro6.vhdl new file mode 100644 index 000000000..27d25fecb --- /dev/null +++ b/testsuite/gna/bug0117/repro6.vhdl @@ -0,0 +1,24 @@ +entity repro6 is +end repro6; + +architecture behav of repro6 is + type bv_array is array(natural range <>) of bit_vector; + type bv_array_ptr is access bv_array; +begin + process + variable count : natural := 0; + impure function seven return natural is + begin + report "seven"; + count := count + 1; + return 7; + end seven; + + subtype array8 is bv_array(seven downto 0); + + subtype array8_1 is array8(open)(0 to 3); + begin + assert count = 1 severity failure; + wait; + end process; +end behav; diff --git a/testsuite/gna/bug0117/testsuite.sh b/testsuite/gna/bug0117/testsuite.sh index d9bb64e30..ac83ccfe4 100755 --- a/testsuite/gna/bug0117/testsuite.sh +++ b/testsuite/gna/bug0117/testsuite.sh @@ -9,6 +9,9 @@ elab_simulate repro1 analyze repro4.vhdl elab_simulate repro4 +analyze repro5.vhdl +elab_simulate repro5 + clean echo "Test successful" -- cgit v1.2.3