Tristan wrote:
FWIW, if I force an Integer-Out-of-Range error ( as opposed to an
Index-Out-of-Range error ), I get the desired results:
c:\ghdl\ghdl-0.31-patched\bin\ghdl.exe:error: bound check failure
at integer_range_test.vhd:15
c:\ghdl\ghdl-0.31-patched\bin\ghdl.exe:error: simulation failed
Yes, but an out of range integer is handled like an out of range
index.
Overflows are triggered when a result is not representable, e.g.:
integer'high + 1
To clarify:
The original issue[1] that I found with regards to bug16782 was a
missing bound check message, and abnormal program exit, when Windows
ghdl-mcode encounters an **index** out of range.
Brian Drummond then started patching the overflow exception path in an
attempt to address this problem, and asked me to test his patch.
( Which I thought sounded reasonable, as IIRC I have seen bounds test
implemented with trapping math against the bounds. )
My recent test of **integer** out of range (rather than index out of
range), which works as expected, seems to show the generated bounds
check code does not lead though the particular overflow handling code
that he was patching.
In any case, the original problem, abnormal program exit without an
error message on an index out of range, remains.
-Brian
[1] https://mail.gna.org/public/ghdl-discuss/2014-01/msg00237.html
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss