diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-19 07:35:17 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-19 07:35:17 +0200 |
commit | 5a1d83434d099fa39cb5e47a5679ed2fd89a3e74 (patch) | |
tree | c86129ba8c7361591d79c9df75880ae3259c5e8a /src/vhdl/vhdl-annotations.adb | |
parent | 8d5e8b1d28c1521578e28fbe54481bcbbc55c9ec (diff) | |
download | ghdl-5a1d83434d099fa39cb5e47a5679ed2fd89a3e74.tar.gz ghdl-5a1d83434d099fa39cb5e47a5679ed2fd89a3e74.tar.bz2 ghdl-5a1d83434d099fa39cb5e47a5679ed2fd89a3e74.zip |
synth-decls: handle unbounded record subtypes. Fix #1324
Diffstat (limited to 'src/vhdl/vhdl-annotations.adb')
-rw-r--r-- | src/vhdl/vhdl-annotations.adb | 25 |
1 files changed, 13 insertions, 12 deletions
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 => |