diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-11 20:45:58 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-12 06:44:24 +0100 |
commit | 783074260833160bfc3ef8f9203147e752e6269e (patch) | |
tree | 5dea0240370acc900b074784a1cce030c28f82dc /src/synth | |
parent | 63bec46536eb29604144cc807b373fd868c30166 (diff) | |
download | ghdl-783074260833160bfc3ef8f9203147e752e6269e.tar.gz ghdl-783074260833160bfc3ef8f9203147e752e6269e.tar.bz2 ghdl-783074260833160bfc3ef8f9203147e752e6269e.zip |
elab-vhdl_annotations(annotate_interface_list_subtype): adjust
Checking is_ref is not enough because of instantiation
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/elab-vhdl_annotations.adb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/synth/elab-vhdl_annotations.adb b/src/synth/elab-vhdl_annotations.adb index 8a4620ddd..fcf7c8adb 100644 --- a/src/synth/elab-vhdl_annotations.adb +++ b/src/synth/elab-vhdl_annotations.adb @@ -310,6 +310,7 @@ package body Elab.Vhdl_Annotations is (Block_Info: Sim_Info_Acc; Decl_Chain: Iir) is El: Iir; + Ind : Iir; begin El := Decl_Chain; while El /= Null_Iir loop @@ -318,10 +319,21 @@ package body Elab.Vhdl_Annotations is | Iir_Kind_Interface_Variable_Declaration | Iir_Kind_Interface_Constant_Declaration | Iir_Kind_Interface_File_Declaration => - if not Get_Is_Ref (El) then - Annotate_Anonymous_Type_Definition - (Block_Info, Get_Type (El)); + Ind := Get_Subtype_Indication (El); + if Ind /= Null_Iir then + case Get_Kind (Ind) is + when Iir_Kinds_Subtype_Definition => + Annotate_Type_Definition (Block_Info, Ind); + when Iir_Kinds_Denoting_Name + | Iir_Kind_Element_Attribute + | Iir_Kind_Subtype_Attribute => + null; + when others => + Error_Kind ("annotate_interface_list_subtype(1)", Ind); + end case; end if; + -- Annotate_Anonymous_Type_Definition + -- (Block_Info, Get_Type (El)); when others => Error_Kind ("annotate_interface_list_subtype", El); end case; |