Brian Drummond wrote:

   " GNA dir bug16782:
  <snip>
   " This application has requested the Runtime to terminate
   " it in an unusual way."

The test is expected to fail; apparently it fails in the wrong way
(some sort of crash where a clean exit is preferred).

While that could be improved for 0.32, I don't see it as serious
enough to hold up the 0.31 release.

I would disagree (at least in regards to posting a Windows ghdl-0.31-mcode binary), for the following reasons:

1) GHDL should issue an index range check error identifying the offending line of code, as it does in the gcc version.

2) This crash happens on simpler indexing as well (see bug2.vhd below).

3) This is the just sort of error, found in freshly typed code, that one entrusts the simulator to find in the first place.

4) Posting a Windows binary that crashes on such a simple index-out-of-range is a bad idea.

-Brian

--
-- simpler indexing testcase derived from gna bug16782
--
entity comp2 is
 port(a :in bit_vector);
end entity;

architecture arch of comp2 is
 constant DATAPATH :natural := a'length;
 signal tmp   :bit;

begin
  tmp <= a(DATAPATH+3);
end architecture;

entity bug2 is end entity;

architecture arch of bug2 is
 constant DATAPATH :natural := 16;
 signal a :bit_vector(DATAPATH-1 downto 0);

begin
 i_comp: entity work.comp2 port map(a);
end architecture;


ghdl -a bug2.vhd
ghdl -e bug2
ghdl -r bug2
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to