From 5a1d83434d099fa39cb5e47a5679ed2fd89a3e74 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 19 May 2020 07:35:17 +0200 Subject: synth-decls: handle unbounded record subtypes. Fix #1324 --- src/vhdl/vhdl-annotations.adb | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/vhdl') diff --git a/src/vhdl/vhdl-annotations.adb b/src/vhdl/vhdl-annotations.adb index e215b934e..4ec3e8849 100644 --- a/src/vhdl/vhdl-annotations.adb +++ b/src/vhdl/vhdl-annotations.adb @@ -346,21 +346,22 @@ package body Vhdl.Annotations is end if; when Iir_Kind_Record_Type_Definition => - declare - List : constant Iir_Flist := - Get_Elements_Declaration_List (Def); - begin - for I in Flist_First .. Flist_Last (List) loop - El := Get_Nth_Element (List, I); - if Get_Subtype_Indication (El) /= Null_Iir then - Annotate_Anonymous_Type_Definition - (Block_Info, Get_Type (El)); - end if; - end loop; - end; if Flag_Synthesis then -- For the offsets. Create_Object_Info (Block_Info, Def, Kind_Type); + else + declare + List : constant Iir_Flist := + Get_Elements_Declaration_List (Def); + begin + for I in Flist_First .. Flist_Last (List) loop + El := Get_Nth_Element (List, I); + if Get_Subtype_Indication (El) /= Null_Iir then + Annotate_Anonymous_Type_Definition + (Block_Info, Get_Type (El)); + end if; + end loop; + end; end if; when Iir_Kind_Record_Subtype_Definition => -- cgit v1.2.3