I Noticed that using this (wrong) syntax ghdl crashes:

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity test is
end test;

architecture str of test is
  type StateType is (stateA, stateB, stateC);
  signal state : StateType;
  signal internalSig : std_logic_vector(3 downto 0);
begin  -- str
   internalSig  <= std_logic_vector(to_unsigned(StateType'pos(state),4));
end str;

This is the message:

[EMAIL PROTECTED]:~/playground/blob$ ghdl -m --workdir=work/ test
canon_extract_sensitivity: can't handle IIR_KIND_POS_ATTRIBUTE
(test.vhdl:18:69)

******************** GHDL Bug occured ****************************
Please report this bug on http://gna.org/projects/ghdl
GHDL release: GHDL 0.26 (20070408) [Sokcho edition]
Compiled with GNAT Version: GPL 2005 (20050729)
In directory: /home/antonio/playground/blob/
Command line:
ghdl -m --workdir=work/ test
Exception TYPES.INTERNAL_ERROR raised
Exception information:
Exception name: TYPES.INTERNAL_ERROR
Message: errorout.adb:71
Call stack traceback locations:
0x8067c8e 0x806da74 0x806d817 0x806d865 0x806dd61 0x806e8b3 0x806e965
0x806ed64 0x807062b 0x8075619
******************************************************************
[EMAIL PROTECTED]:~/playground/blob$

the syntax is bad, i used the 'pos attribute with a object as  parameter
("state")  instead one of its value (es: "stateA") and this error was easy
to find, bud ghdl should not to crash.
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to