diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-10-01 17:02:27 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-10-01 17:12:12 +0200 |
commit | 7784fd83f47763efc5126b96cebc322f3311774e (patch) | |
tree | 8a431ece559553ea816b430aa1f0b58e5295c175 /src/vhdl/iirs_utils.adb | |
parent | d5702f01058dc85caca2538c456717abab2d18f8 (diff) | |
download | ghdl-7784fd83f47763efc5126b96cebc322f3311774e.tar.gz ghdl-7784fd83f47763efc5126b96cebc322f3311774e.tar.bz2 ghdl-7784fd83f47763efc5126b96cebc322f3311774e.zip |
Consider object for array attribute.
Fix issue #151
Diffstat (limited to 'src/vhdl/iirs_utils.adb')
-rw-r--r-- | src/vhdl/iirs_utils.adb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vhdl/iirs_utils.adb b/src/vhdl/iirs_utils.adb index 777965cd0..6441e789a 100644 --- a/src/vhdl/iirs_utils.adb +++ b/src/vhdl/iirs_utils.adb @@ -1174,21 +1174,21 @@ package body Iirs_Utils is function Create_Array_Subtype (Arr_Type : Iir; Loc : Location_Type) return Iir_Array_Subtype_Definition is + Base_Type : constant Iir := Get_Base_Type (Arr_Type); + El_Type : constant Iir := Get_Element_Subtype (Base_Type); Res : Iir_Array_Subtype_Definition; - Base_Type : Iir; List : Iir_List; begin Res := Create_Iir (Iir_Kind_Array_Subtype_Definition); Set_Location (Res, Loc); - Base_Type := Get_Base_Type (Arr_Type); Set_Base_Type (Res, Base_Type); - Set_Element_Subtype (Res, Get_Element_Subtype (Base_Type)); + Set_Element_Subtype (Res, El_Type); if Get_Kind (Arr_Type) = Iir_Kind_Array_Subtype_Definition then Set_Resolution_Indication (Res, Get_Resolution_Indication (Arr_Type)); end if; Set_Resolved_Flag (Res, Get_Resolved_Flag (Arr_Type)); Set_Signal_Type_Flag (Res, Get_Signal_Type_Flag (Arr_Type)); - Set_Type_Staticness (Res, Get_Type_Staticness (Base_Type)); + Set_Type_Staticness (Res, Get_Type_Staticness (El_Type)); List := Create_Iir_List; Set_Index_Subtype_List (Res, List); Set_Index_Constraint_List (Res, List); |