summaryrefslogtreecommitdiff
path: root/testsuite/gna/ticket9/index_range_test_B.vhd
diff options
context:
space:
mode:
authorTristan Gingold2014-02-01 04:43:41 +0100
committerTristan Gingold2014-02-01 04:43:41 +0100
commit1df58ba6e882f71a7c5d1a0ec6fcfba01cd02cb9 (patch)
tree44b46c077a2236c273952e9fcc0a7f8a4545ed85 /testsuite/gna/ticket9/index_range_test_B.vhd
parent65f7250d7f0ddbf916758acd1a91d313e57ca0f1 (diff)
downloadghdl-1df58ba6e882f71a7c5d1a0ec6fcfba01cd02cb9.tar.gz
ghdl-1df58ba6e882f71a7c5d1a0ec6fcfba01cd02cb9.tar.bz2
ghdl-1df58ba6e882f71a7c5d1a0ec6fcfba01cd02cb9.zip
Add ticket9 test.
Diffstat (limited to 'testsuite/gna/ticket9/index_range_test_B.vhd')
-rw-r--r--testsuite/gna/ticket9/index_range_test_B.vhd24
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/gna/ticket9/index_range_test_B.vhd b/testsuite/gna/ticket9/index_range_test_B.vhd
new file mode 100644
index 0000000..d28a358
--- /dev/null
+++ b/testsuite/gna/ticket9/index_range_test_B.vhd
@@ -0,0 +1,24 @@
+--
+-- indexing testcase "B" derived from gna bug16782
+--
+-- ghdl-0.31-mcode on win32 : indexing off the end of a bit_vector results in an overflow exception message
+--
+
+entity index_range_test_B is
+end entity;
+
+architecture arch of index_range_test_B is
+
+ signal a : bit_vector(15 downto 0);
+ signal tmp : bit;
+ signal i : integer;
+
+ constant DATAPATH : natural := a'length;
+
+begin
+
+ i <= DATAPATH + 3;
+
+ tmp <= a(i);
+
+end architecture; \ No newline at end of file