diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-01-10 07:44:56 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-01-10 07:44:56 +0100 |
commit | 3641df142fff346e8acb4ed74cfab0a16fcbb9e3 (patch) | |
tree | ae4d77ac3700a007edddd9418e71ae30e27985f9 /src/synth | |
parent | 686be1369e17771c4d179626c20ce7ae5e090edc (diff) | |
download | ghdl-3641df142fff346e8acb4ed74cfab0a16fcbb9e3.tar.gz ghdl-3641df142fff346e8acb4ed74cfab0a16fcbb9e3.tar.bz2 ghdl-3641df142fff346e8acb4ed74cfab0a16fcbb9e3.zip |
synth: refine handling of interface type. Fix #1944
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/elab-vhdl_insts.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb index ac955db0e..5192046b1 100644 --- a/src/synth/elab-vhdl_insts.adb +++ b/src/synth/elab-vhdl_insts.adb @@ -108,10 +108,14 @@ package body Elab.Vhdl_Insts is when Iir_Kind_Interface_Type_Declaration => declare + Act : Node; Act_Typ : Type_Acc; begin - Act_Typ := Synth_Subtype_Indication - (Syn_Inst, Get_Actual (Assoc)); + Act := Get_Actual (Assoc); + if Get_Kind (Act) in Iir_Kinds_Denoting_Name then + Act := Get_Type (Act); + end if; + Act_Typ := Synth_Subtype_Indication (Syn_Inst, Act); Create_Subtype_Object (Sub_Inst, Get_Type (Inter), Act_Typ); end; |