diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-decls.adb | 8 | ||||
-rw-r--r-- | src/vhdl/vhdl-annotations.adb | 14 |
2 files changed, 10 insertions, 12 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb index e819ac116..add870a11 100644 --- a/src/synth/synth-decls.adb +++ b/src/synth/synth-decls.adb @@ -113,8 +113,10 @@ package body Synth.Decls is -- The elaboration of an index constraint consists of the -- declaration of each of the discrete ranges in the index -- constraint in some order that is not defined by the language. - Synth_Anonymous_Subtype_Indication - (Syn_Inst, Get_Element_Subtype (Atype)); + if Get_Array_Element_Constraint (Atype) /= Null_Node then + Synth_Subtype_Indication + (Syn_Inst, Get_Element_Subtype (Atype)); + end if; declare St_Indexes : constant Iir_Flist := Get_Index_Subtype_List (Atype); @@ -159,6 +161,8 @@ package body Synth.Decls is Synth_Subtype_Indication (Syn_Inst, Atype); end Synth_Anonymous_Subtype_Indication; + pragma Unreferenced (Synth_Anonymous_Subtype_Indication); + function Get_Declaration_Type (Decl : Node) return Node is Ind : constant Node := Get_Subtype_Indication (Decl); diff --git a/src/vhdl/vhdl-annotations.adb b/src/vhdl/vhdl-annotations.adb index 1d9792948..077c66e99 100644 --- a/src/vhdl/vhdl-annotations.adb +++ b/src/vhdl/vhdl-annotations.adb @@ -359,16 +359,10 @@ package body Vhdl.Annotations is Annotate_Anonymous_Type_Definition (Block_Info, El); when Iir_Kind_Array_Subtype_Definition => - declare - El_Type : constant Iir := Get_Element_Subtype (Def); - Bel_Type : constant Iir := - Get_Element_Subtype (Get_Base_Type (Def)); - begin - if El_Type /= Bel_Type then - Annotate_Anonymous_Type_Definition - (Block_Info, Get_Element_Subtype (Def)); - end if; - end; + if Get_Array_Element_Constraint (Def) /= Null_Node then + Annotate_Type_Definition + (Block_Info, Get_Element_Subtype (Def)); + end if; if Flag_Synthesis then -- For the bounds. Create_Object_Info (Block_Info, Def); |