aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket9/readme.txt
blob: ae5f02c70bf1f047a69b28d98345441e2823e6fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
GHDL 0.31-mcode index out of range behavior 

---------------------
Information

GHDL     : GHDL-0.31 release source tree
COMPILER : GNAT 2013
OS       : XP SP3 32 bit

The attached zip file contains two testcases for index out of range.

---------------------
index_range_test_A.vhd 

This test indexes off the end of an unconstrained port of type bit_vector.

This version exits abnormally, with no message, for GHDL-0.31-mcode on Windows:

    C:\brian\jobs\ghdl_test\test_exceptions>ghdl -r index_range_test_A

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.

In contrast, ghdl-gcc 0.27 prints the offending code line number:

    $ ghdl -r index_range_test_A
    ./index_range_test_a:error: bound check failure at index_range_test_A.vhd:19
    ghdl: compilation error


The same abnormal exit behavior is seen for ghdl-mcode when running test suite gna/bug16782

---------------------
index_range_test_B.vhd 

This test indexes off the end of a bit_vector signal of static width.

This version exits with an overflow message for GHDL-0.31-mcode:

    C:\brian\jobs\ghdl_test\test_exceptions>ghdl -r index_range_test_B
    c:\ghdl\ghdl-0.31\bin\ghdl.exe:error: overflow detected
    c:\ghdl\ghdl-0.31\bin\ghdl.exe:error: simulation failed


In contrast, ghdl-gcc 0.27 prints the offending code line number:

    $ ghdl -r index_range_test_B
    ./index_range_test_b:error: bound check failure at index_range_test_B.vhd:22
    ./index_range_test_b:error: simulation failed
    ghdl: compilation error


---------------------
Related ghdl-discuss messages:

https://mail.gna.org/public/ghdl-discuss/2014-01/msg00233.html
https://mail.gna.org/public/ghdl-discuss/2014-01/msg00237.html

---------------------
zip file contents:

  readme.txt : this file

  index_range_test_A.vhd
  index_range_test_A.ghdl-0.31-mcode.win32.log

  index_range_test_B.vhd
  index_range_test_B.ghdl-0.31-mcode.win32.log