diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-07-30 09:27:22 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-07-30 09:27:22 +0200 |
commit | a8babf4111c6724dab1446e70d12da50a324eb5e (patch) | |
tree | 115cd09775d3d6680c1b78362bc7564f63130d28 /src/vhdl | |
parent | c10c294f6cee7326c80e5a0ed0f57ce2eb1e565f (diff) | |
download | ghdl-a8babf4111c6724dab1446e70d12da50a324eb5e.tar.gz ghdl-a8babf4111c6724dab1446e70d12da50a324eb5e.tar.bz2 ghdl-a8babf4111c6724dab1446e70d12da50a324eb5e.zip |
trans-chap3: translate subtype indication of access subtype. Fix #2152
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/translate/trans-chap3.adb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/vhdl/translate/trans-chap3.adb b/src/vhdl/translate/trans-chap3.adb index adb1f9d01..6d0e3c21d 100644 --- a/src/vhdl/translate/trans-chap3.adb +++ b/src/vhdl/translate/trans-chap3.adb @@ -2526,9 +2526,20 @@ package body Trans.Chap3 is end if; when Iir_Kind_Access_Subtype_Definition => - -- Like the access type. - Free_Info (Def); - Set_Info (Def, Get_Info (Get_Parent_Type (Def))); + declare + Ind : constant Iir := Get_Designated_Subtype_Indication (Def); + Mark : Id_Mark_Type; + begin + if Ind /= Null_Iir then + Push_Identifier_Prefix (Mark, "EST"); + Translate_Subtype_Definition (Ind, With_Vars); + Pop_Identifier_Prefix (Mark); + end if; + + -- Like the access type. + Free_Info (Def); + Set_Info (Def, Get_Info (Get_Parent_Type (Def))); + end; when others => Error_Kind ("translate_subtype_definition", Def); |