diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-11-07 07:48:55 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-11-07 07:48:55 +0100 |
commit | a08289c5ad4c904a1b16445ee35fb00c05f87b64 (patch) | |
tree | 9406b043b8a90c06f0136ab19b6fadc20a1ae161 /src/vhdl/translate/trans-chap14.adb | |
parent | 06d553f9d32184ad71f47bbcfcde2528d40408ac (diff) | |
download | ghdl-a08289c5ad4c904a1b16445ee35fb00c05f87b64.tar.gz ghdl-a08289c5ad4c904a1b16445ee35fb00c05f87b64.tar.bz2 ghdl-a08289c5ad4c904a1b16445ee35fb00c05f87b64.zip |
Use flist for enumerations.
Diffstat (limited to 'src/vhdl/translate/trans-chap14.adb')
-rw-r--r-- | src/vhdl/translate/trans-chap14.adb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vhdl/translate/trans-chap14.adb b/src/vhdl/translate/trans-chap14.adb index 8fd37261b..2e554d556 100644 --- a/src/vhdl/translate/trans-chap14.adb +++ b/src/vhdl/translate/trans-chap14.adb @@ -326,21 +326,21 @@ package body Trans.Chap14 is | Type_Mode_E32 => -- Should check it is not the last. declare - List : constant Iir_List := Get_Enumeration_Literal_List + List : constant Iir_Flist := Get_Enumeration_Literal_List (Get_Base_Type (Expr_Type)); - Limit : Iir; + Limit : Natural; L : O_Dnode; begin L := Create_Temp_Init (Ttype, Expr); if Is_Inc then - Limit := Get_Last_Element (List); + Limit := Get_Nbr_Elements (List) - 1; else - Limit := Get_First_Element (List); + Limit := 0; end if; Chap6.Check_Bound_Error (New_Compare_Op (ON_Eq, New_Obj_Value (L), - New_Lit (Get_Ortho_Expr (Limit)), + New_Lit (Get_Ortho_Expr (Get_Nth_Element (List, Limit))), Ghdl_Bool_Type), Attr, 0); return New_Convert_Ov |