aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/synth/synth-decls.adb14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb
index add870a11..4866b112b 100644
--- a/src/synth/synth-decls.adb
+++ b/src/synth/synth-decls.adb
@@ -104,6 +104,14 @@ package body Synth.Decls is
end case;
end Synth_Range_Constraint;
+ procedure Synth_Subtype_Indication_If_Anonymous
+ (Syn_Inst : Synth_Instance_Acc; Atype : Node) is
+ begin
+ if Get_Type_Declarator (Atype) = Null_Node then
+ Synth_Subtype_Indication (Syn_Inst, Atype);
+ end if;
+ end Synth_Subtype_Indication_If_Anonymous;
+
procedure Synth_Subtype_Indication
(Syn_Inst : Synth_Instance_Acc; Atype : Node) is
begin
@@ -113,10 +121,8 @@ 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.
- if Get_Array_Element_Constraint (Atype) /= Null_Node then
- Synth_Subtype_Indication
- (Syn_Inst, Get_Element_Subtype (Atype));
- end if;
+ Synth_Subtype_Indication_If_Anonymous
+ (Syn_Inst, Get_Element_Subtype (Atype));
declare
St_Indexes : constant Iir_Flist :=
Get_Index_Subtype_List (Atype);