aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-01-26 06:45:25 +0100
committerTristan Gingold <tgingold@free.fr>2018-01-26 06:45:25 +0100
commit588437bbed0dafcff25b2b3593cc7885d7f3722e (patch)
tree171a2d639108baa7fa82f8a21411fdcc7fa36a81 /src
parentbca6f08e125a734f35d60372031aeb184de1148f (diff)
downloadghdl-588437bbed0dafcff25b2b3593cc7885d7f3722e.tar.gz
ghdl-588437bbed0dafcff25b2b3593cc7885d7f3722e.tar.bz2
ghdl-588437bbed0dafcff25b2b3593cc7885d7f3722e.zip
sem_types: fix 'open' handling for array subtype.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/sem_types.adb7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vhdl/sem_types.adb b/src/vhdl/sem_types.adb
index 0f3f38e05..01b862f3c 100644
--- a/src/vhdl/sem_types.adb
+++ b/src/vhdl/sem_types.adb
@@ -1497,8 +1497,8 @@ package body Sem_Types is
procedure Sem_Array_Constraint_Indexes (Def : Iir; Type_Mark : Iir)
is
El_Type : constant Iir := Get_Element_Subtype (Type_Mark);
+ Base_Type : constant Iir := Get_Base_Type (Type_Mark);
Type_Index, Subtype_Index: Iir;
- Base_Type : Iir;
Index_Staticness : Iir_Staticness;
Type_Nbr_Dim : Natural;
Subtype_Nbr_Dim : Natural;
@@ -1507,7 +1507,6 @@ package body Sem_Types is
Subtype_Index_List2 : Iir_Flist;
begin
-- Check each index constraint against array type.
- Base_Type := Get_Base_Type (Type_Mark);
Set_Base_Type (Def, Base_Type);
Index_Staticness := Locally;
@@ -1527,10 +1526,12 @@ package body Sem_Types is
if Get_Kind (Type_Mark) = Iir_Kind_Array_Subtype_Definition then
Set_Index_Constraint_Flag
(Def, Get_Index_Constraint_Flag (Type_Mark));
+ Set_Index_Subtype_List
+ (Def, Get_Index_Subtype_List (Type_Mark));
else
Set_Index_Constraint_Flag (Def, False);
+ Set_Index_Subtype_List (Def, Type_Index_List);
end if;
- Set_Index_Subtype_List (Def, Type_Index_List);
else
if Get_Kind (Type_Mark) = Iir_Kind_Array_Subtype_Definition
and then Get_Index_Constraint_Flag (Type_Mark)