aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug0117/repro6.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-07-25 11:32:56 +0200
committerTristan Gingold <tgingold@free.fr>2020-07-25 11:32:56 +0200
commit6b218517c8838d68008ab6031debcdbe1ad9bf0e (patch)
tree6a5b40010d365bc63c5edc9a42cfbc3c49f48dff /testsuite/gna/bug0117/repro6.vhdl
parenta8a33296493e609335177703349465712e8245e2 (diff)
downloadghdl-6b218517c8838d68008ab6031debcdbe1ad9bf0e.tar.gz
ghdl-6b218517c8838d68008ab6031debcdbe1ad9bf0e.tar.bz2
ghdl-6b218517c8838d68008ab6031debcdbe1ad9bf0e.zip
testsuite/gna: add a test for unbounded arrays.
Diffstat (limited to 'testsuite/gna/bug0117/repro6.vhdl')
-rw-r--r--testsuite/gna/bug0117/repro6.vhdl24
1 files changed, 24 insertions, 0 deletions
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;